Re: jpeg to bmp with pixbuf



Adding gtk-app-devel-list back. Please don't respond privately.

.bmp

Uncompressed image. Without any image compression algorithm.

Hmm. .bmp is a file format, and as it has several parameters that can
vary independently, effectively a collection of subformats. (Not all
of the possible parameter settings occur in practise in real-life .bmp
files out there, except intentionally produced samples, and not even
Microsoft's own software like IE necessarily correctly displays .bmp
files with some rare parameter combinations.)

If what you want is to read in a jpeg file and write out a bmp file,
why didn't you simply say so? Anyway, yes, you can do that with
gdk-pixbuf. Load the image using the jpeg loader, save it using the
bmp loader. The gdk-pixbuf API is quite simple, it shouldn't be hard
to figure out yourself.

If what you actually want is an in-memory uncompressed image, then
yes, that is what loading an image from a file (or from a file's data
in memory) into a GdkPixbuf does. The pixel data in a GdkPixbuf is one
byte per channel per pixel. It won't be organised in memory in a way
that exactly would correspond to the data of the most common .bmp file
formats, though.

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]