Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ARToolKitPlus/tools/PATT_to_PPM
diff options
context:
space:
mode:
Diffstat (limited to 'ARToolKitPlus/tools/PATT_to_PPM')
-rw-r--r--ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsp102
-rw-r--r--ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsw29
-rw-r--r--ARToolKitPlus/tools/PATT_to_PPM/src/main.cpp130
3 files changed, 0 insertions, 261 deletions
diff --git a/ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsp b/ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsp
deleted file mode 100644
index a3cdaff..0000000
--- a/ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="PATT_to_PPM" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=PATT_to_PPM - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "PATT_to_PPM.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "PATT_to_PPM.mak" CFG="PATT_to_PPM - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "PATT_to_PPM - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "PATT_to_PPM - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "PATT_to_PPM - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(POCKETKNIFEROOT)/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0xc07 /d "NDEBUG"
-# ADD RSC /l 0xc07 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/PATT_to_PPM.exe" /libpath:"$(POCKETKNIFEROOT)/build/vc6/release"
-
-!ELSEIF "$(CFG)" == "PATT_to_PPM - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(POCKETKNIFEROOT)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0xc07 /d "_DEBUG"
-# ADD RSC /l 0xc07 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../../bin/PATT_to_PPMd.exe" /pdbtype:sept /libpath:"$(POCKETKNIFEROOT)/build/vc6/debug"
-
-!ENDIF
-
-# Begin Target
-
-# Name "PATT_to_PPM - Win32 Release"
-# Name "PATT_to_PPM - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\main.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsw b/ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsw
deleted file mode 100644
index 2ec4629..0000000
--- a/ARToolKitPlus/tools/PATT_to_PPM/build/VC6/PATT_to_PPM.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "PATT_to_PPM"=.\PATT_to_PPM.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/ARToolKitPlus/tools/PATT_to_PPM/src/main.cpp b/ARToolKitPlus/tools/PATT_to_PPM/src/main.cpp
deleted file mode 100644
index efe49bf..0000000
--- a/ARToolKitPlus/tools/PATT_to_PPM/src/main.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-
-//
-//
-// This tool will read ARToolKit pattern files (with variable size) and save
-// them as Portable Pixmap (.ppm) files.
-//
-// Usage: PATT_to_PPM [infilename] [outfilename] [width] [height]
-//
-//
-// Thanks to Antonio Bleile for contributing the PPM writer code
-//
-
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-
-
-
-char
-skipSpaces(FILE* fp)
-{
- char ch = ' ';
-
- while( ch==' ' && !feof(fp))
- ch = fgetc(fp);
-
- return ch;
-}
-
-
-bool
-readNumber(FILE* fp, char* buffer, int maxLen)
-{
- char ch = 0;
- int i=0;
-
- do {
- ch = fgetc(fp);
- if(ch>='0' && ch<='9')
- buffer[i++] = ch;
- } while(!feof(fp) && i<maxLen-1 && ch!=' ');
-
-
- buffer[i++] = 0;
- return i<maxLen && !feof(fp);
-}
-
-
-bool
-writePPM( const char *fileName, unsigned char *data, int width, int height )
-{
- FILE *file = fopen( fileName, "wb" );
- if( !file ){
- printf( "Could not open file %s for writing\n", fileName );
- return false;
- }
-
- // error checking omitted
- fprintf( file, "P6\n# generated by patt_to_ppm\n%d %d\n255\n", width, height );
- fwrite( data, width*height*3, 1, file );
-
- fclose( file );
-
- return true;
-}
-
-
-unsigned char *
-readMarkerFile(const char* nFileName, int nMarkerWidth, int nMarkerHeight)
-{
- FILE* fp = fopen(nFileName, "r");
-
- if(!fp)
- return NULL;
-
- const int strMax = 256, numPix = nMarkerWidth*nMarkerHeight;
- unsigned char* pixels24 = new unsigned char[numPix*3];
- char str[strMax+1];
- int x,y,channel;
-
- for(channel=0; channel<3; channel++)
- for(y=0; y<nMarkerHeight; y++)
- {
- for(x=0; x<nMarkerWidth; x++)
- {
- str[0] = skipSpaces(fp);
- readNumber(fp, str+1, strMax);
- int value = atoi(str);
- int offset = 3*(x + y*nMarkerWidth) + channel;
- assert(offset < numPix*3);
- pixels24[offset] = value;
- }
- }
-
-
- fclose(fp);
-
- return pixels24;
-}
-
-
-int main(int argc, char** argv)
-{
- unsigned char *patternImage;
- int width = 16, height = 16;
-
- if(argc<3)
- {
- printf("ERROR: to few parameters\n");
- printf("Usage: %s infilename outfilename [width=16] [height=16]\n", argv[0] );
- printf("Example: %s patt.hiro patt_hiro.ppm 32 32\n", argv[0] );
- return -1;
- }
-
- const char *inName = argv[1],
- *outName = argv[2];
-
- if( argc >= 4 )
- width = atoi( argv[3] );
- if( argc >= 5 )
- height = atoi( argv[4] );
-
- patternImage = readMarkerFile(inName, width,height);
-
- if( patternImage )
- writePPM( outName, patternImage, width, height );
-
- return 0;
-}