Results 1 to 4 of 4

Thread: Image2Code bitmap to source code converter

  1. #1
    Join Date
    2001/03
    Location
    Spokane, Washington
    Posts
    4,092

    Image2Code bitmap to source code converter

    We have created a small application that will convert 1-bit or 8-bit images into source either assembly or C source code.

    The project is open source, so you can add functionality to it or customize it. Here is a link to the SourceForge project page:

    http://sourceforge.net/project/showf...roup_id=230242

    The big thing that this program adds is complete flexibility in the byte orientation and scan direction.

    The 8-bit operation is fairly straight-forward:



    Simply drop an 8-bit indexed image into the program, Select the scan direction, select Assembly or C, and click "convert". The output will be shown in notepad, ready to copy into your program.

    The 1-bit ("bitmap") version is a bit more complex, but follows the same general flow:



    You have complete flexibility in choosing the orientation of the bits so they can match your LCD's internal memory configuration. If your LCD's pixel dimensions are not an even multiple of 8 bits (rare, but does happen on occasion), you can choose the edge that gets clipped.

    Here are some sample C output screen shots:





    Here are some sample ASM output screen shots:





    The great thing about this program is that if it does not quite do what you want, you can use SourceForge to change it to meet your needs.

  2. #2
    Join Date
    2011/11
    Posts
    1

    Unhappy Help?

    I am having trouble compiling the source on Mac OS X. I have installed all requisites but am receiving an error when running scons in the trunk folder:
    Code:
    In file included from Image2Code/ArrayWriter.cpp:20:
    Image2Code/Cross.h:102:2: error: #error "Unsupported OS"
    In file included from Image2Code/ArrayWriter.cpp:21:
    Image2Code/ArrayWriter.h:29: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:30: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:37: error: ‘StdFileIO’ has not been declared
    Image2Code/ArrayWriter.h:57: error: ‘StdFileIO’ has not been declared
    Image2Code/ArrayWriter.h:59: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:60: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:66: error: ‘StdFileIO’ has not been declared
    Image2Code/ArrayWriter.h:68: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:69: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:75: error: ‘Portable_String’ does not name a type
    Image2Code/ArrayWriter.h:76: error: ‘StdFileIO’ has not been declared
    Image2Code/ArrayWriter.h:78: error: ‘Portable_String’ does not name a type
    In file included from Image2Code/ArrayWriter.cpp:22:
    Image2Code/ImageArray.h:28: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:29: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:31: error: expected `)' before ‘x’
    Image2Code/ImageArray.h:32: error: expected `)' before ‘x’
    Image2Code/ImageArray.h:33: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:34: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:35: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:43: error: ‘BOOL’ does not name a type
    Image2Code/ImageArray.h:44: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:46: error: expected `)' before ‘right2left’
    Image2Code/ImageArray.h:49: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:49: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:50: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:51: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:52: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:53: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:53: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:54: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:58: error: ISO C++ forbids declaration of ‘Bitmap’ with no type
    Image2Code/ImageArray.h:58: error: expected ‘;’ before ‘*’ token
    Image2Code/ImageArray.h:60: error: ‘BOOL’ does not name a type
    Image2Code/ImageArray.h:62: error: expected `)' before ‘*’ token
    Image2Code/ImageArray.h:65: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:67: error: ‘BOOL’ has not been declared
    Image2Code/ImageArray.h:68: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:69: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:70: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:71: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:72: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:73: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h: In member function ‘void ImageArray::BitPacker::Ready(int, int)’:
    Image2Code/ImageArray.h:49: error: ‘m_img_width’ was not declared in this scope
    Image2Code/ImageArray.h:49: error: ‘m_img_height’ was not declared in this scope
    Image2Code/ImageArray.h: At global scope:
    Image2Code/ImageArray.h:80: error: ‘INT’ does not name a type
    Image2Code/ImageArray.h:81: error: ‘BOOL’ does not name a type
    Image2Code/ImageArray.h:82: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:83: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:85: error: expected `)' before ‘right2left’
    Image2Code/ImageArray.h:86: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:87: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:88: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:89: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:89: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:90: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:96: error: expected `)' before ‘right2left’
    Image2Code/ImageArray.h:97: error: ‘UCHAR’ does not name a type
    Image2Code/ImageArray.h:98: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:99: error: ‘UINT’ does not name a type
    Image2Code/ImageArray.h:100: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:100: error: ‘UINT’ has not been declared
    Image2Code/ImageArray.h:101: error: ‘UCHAR’ does not name a type
    Image2Code/ArrayWriter.cpp: In destructor ‘ArrayWriters::~ArrayWriters()’:
    Image2Code/ArrayWriter.cpp:33: error: ‘UINT’ was not declared in this scope
    Image2Code/ArrayWriter.cpp:33: error: expected `;' before ‘i’
    Image2Code/ArrayWriter.cpp:33: error: ‘i’ was not declared in this scope
    Image2Code/ArrayWriter.cpp: At global scope:
    Image2Code/ArrayWriter.cpp:38: error: variable or field ‘IWriter’ declared void
    Image2Code/ArrayWriter.cpp:38: error: ‘StdFileIO’ was not declared in this scope
    Image2Code/ArrayWriter.cpp:38: error: ‘file’ was not declared in this scope
    Image2Code/ArrayWriter.cpp:38: error: expected primary-expression before ‘*’ token
    Image2Code/ArrayWriter.cpp:38: error: ‘img’ was not declared in this scope
    scons: *** [Image2Code/ArrayWriter.o] Error 1
    scons: building terminated because of errors.
    Can you please help me?

  3. #3
    Join Date
    2012/08
    Posts
    1
    hello
    where is download source code c++?
    thanks.
    hosseinjavidian@gmail.com

  4. #4
    Join Date
    2001/03
    Location
    Spokane, Washington
    Posts
    4,092
    Quote Originally Posted by hosseinzpp View Post
    where is download source code c++?
    Under the "code" tab of SourceForge:
    http://sourceforge.net/p/image2code/code/HEAD/tree/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •