Let's assume that I want to create a jpeg image and I know the argb value I want to give to every pixel.
How can I do that? It is ok if I have to write the file a byte at a time; the problem is just that I don't know how a jpeg file is structured.
Any help?
A bmp would be ok too, I just need a fast way to build images!
4 replies to this topic
#1
Posted 11 December 2010 - 08:11 AM
|
|
|
#2
Posted 11 December 2010 - 08:39 AM
Due to popularity of both JPEG and BMP formats, I believe you would already had support for them in any high level programming language. So, what is your language?
Anyhow, JPEG is similar with BMP. Both are two dimensional array of colors. JPEG simply add compression algorithm to minimize the size. While with BMP there are only two size optimizations you could, either using smaller color depth (reducing the size of the color definition) or using palette (where the 2 dimensional array does not contain the color definitions but pointers or indexes of color definition).
Anyhow, JPEG is similar with BMP. Both are two dimensional array of colors. JPEG simply add compression algorithm to minimize the size. While with BMP there are only two size optimizations you could, either using smaller color depth (reducing the size of the color definition) or using palette (where the 2 dimensional array does not contain the color definitions but pointers or indexes of color definition).
#3
Posted 11 December 2010 - 08:49 AM
#4
Posted 11 December 2010 - 12:55 PM
Have a look at: Wotsit.org
It lists alot of the file formsts. However certain languages might have issues with writing the format correctly if you don't have good control
over datasizes.
It lists alot of the file formsts. However certain languages might have issues with writing the format correctly if you don't have good control
over datasizes.
#5
Posted 11 December 2010 - 02:42 PM
Thanks, I solved the problem anyway :D
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









