Writing a .jpg image

Blitz3D Forums/Blitz3D Beginners Area/Writing a .jpg image

Terry B.(Posted 2007) [#1]
Is it possible to write a .jpg image in blitz? I know with saveimage you can save in .bmp but not .jpg, so how would I go about doing this?


Fuller(Posted 2007) [#2]
SaveImage image,"image.jpg"


That should do the trick.


GfK(Posted 2007) [#3]
That'll save a BMP file with a JPG extension, won't it?


Fuller(Posted 2007) [#4]
It wouldn't compress it, no. But it would create a jpeg image.
I'm not sure if there is any sure-fire way to create a true jpeg image.


GfK(Posted 2007) [#5]
It wouldn't compress it, no. But it would create a jpeg image.
I don't have Blitz3D installed any more so I can't prove it, but I'm quite sure you're wrong. The file will still be saved with a BMP header.


b32(Posted 2007) [#6]
Yes, I think Gfk is right, it is a .bmp file with a .jpg extension. But maybe you could use FreeImage to save jpg ?


Tom(Posted 2007) [#7]
SaveImage saves to BMP only.


b32(Posted 2007) [#8]
:/ Right, there is also a command called FreeImage .. which makes my remark quite ambigious.. Actually I ment this:
http://freeimage.sourceforge.net/


Yo! Wazzup?(Posted 2007) [#9]
If you do

SaveImage image,"image.bmp"



and then do


SaveImage image,"image.jpg"



and open both files in notepad, you'll get the same exact text. (BMP encoded)


Danny(Posted 2007) [#10]
use FreeImage library to save JPG/png/whatever..

http://freeimage.sourceforge.net


Boiled Sweets(Posted 2007) [#11]
And the DECLS are in the code archives...