Image To Code (AKA Image To C) Plugin
#1
Posted 09 February 2007 - 03:50 PM
This is an old school image-to-code addin for Paint.NET 3.0, it will take an image and will convert it to code.
From there you can compile the image into your code as data.
Currently only C/C++ is supported and not all the formats are tested.
In order to install it copy the dll into %ProgramFiles%\Paint.NET\FileTypes
Cheers.
#2
Posted 09 February 2007 - 04:25 PM
BTW...This is pretty cool!

Take responsibility for your own intelligence.
#3
Posted 09 February 2007 - 04:32 PM
What is the size limitation of the picture?
What could we do with the code?
#4
Posted 09 February 2007 - 04:39 PM
Would you be able to make it so you could use this to output a PDN Palette file?
I have no programing experiance. That said, could you calculate the 96 most used colors in an image and then output them in HEX order to a .txt file?

Take responsibility for your own intelligence.
#5
Posted 10 February 2007 - 09:59 AM
It will just take the image and convert it to a C/C++ data structure.How does it work?
No size limitation, it will output array as big as you image.What is the size limitation of the picture?
You can take the data structure as use it in your code, today most ppl can use resources to achieve that, but under some circumstances (embedded device for example) you can't and your only way to store gfx is using your code data segment.What could we do with the code?
#6
Posted 10 February 2007 - 10:01 AM
Is there any way to add the option to recompile the code as an image?
BTW...This is pretty cool!
Sounds cool to implement, but currently this is a one way tool.
#7
Posted 10 February 2007 - 10:05 AM
I just tried it. Works pretty good.
Would you be able to make it so you could use this to output a PDN Palette file?
I have no programing experiance. That said, could you calculate the 96 most used colors in an image and then output them in HEX order to a .txt file?
a. Palette has 256 color not 96.
b. In the near future I will add support for 8 bit palettized images.
#8
Posted 10 February 2007 - 10:09 AM
Could you provide a short code example (C/C++)?
#9
Posted 11 February 2007 - 12:35 AM
I just tried it. Works pretty good.
Would you be able to make it so you could use this to output a PDN Palette file?
I have no programing experiance. That said, could you calculate the 96 most used colors in an image and then output them in HEX order to a .txt file?
a. Palette has 256 color not 96.
b. In the near future I will add support for 8 bit palettized images.
ShayEr, that may be true, but a Paint.NET palette file only contains room for 96 colors.





Download: BoltBait's Plugin Pack | CodeLab | More... and how about a Computer Dominos Game
#10
Posted 25 April 2012 - 11:58 PM
#11
Posted 26 April 2012 - 12:06 AM
Donations are always appreciated! http://www.getpaint.net/donate.html
#12
Posted 26 April 2012 - 01:14 AM
Namely allow for text to be turned back into the image.And do what exactly
#13
Posted 26 April 2012 - 02:49 AM
It seems to do just what was promised. Surely it is the job of your code to manipulate and interpret the data structure, and not a Paint.NET plugin?(..) it will take an image and will convert it to code.
From there you can compile the image into your code as data.

Mastering Paint.NET | WhichSymbol+ | Plugin Index | Stereogram Tut | Support Codelab | Blog
#14
Posted 26 April 2012 - 06:23 AM
Namely allow for text to be turned back into the image.
You can already do that. Just add a block of code to save the image and run the modified program ... ?
Donations are always appreciated! http://www.getpaint.net/donate.html
#15
Posted 08 August 2012 - 11:14 AM












