Sign up

pixbuf setoption not effective

I resize a image, read source image's orientation, use setOption method write to new pixbuf and save.

srcPixbuf = new Pixbuf(/path/to/source/image);
string isRot = srcPixbuf.getOption("orientation");
writeln(isRot);
dstPixbuf = srcPixbuf.scaleSimple(nw, nh, InterpType.BILINEAR);
bool isOK = dstPixbuf.setOption("orientation", isRot);
if (isOK) {
     dstPixbuf.savev("dst.jpg","jpeg",["quality"],["95"]);
} else {
     writeln("set Option fail.");
}

read source image's orientation is 8, write orientation of dstpixbuf is successful and return true. But, read dst.jpg, it's orientation is null.
it's Not written?

Re: pixbuf setoption not effective

On 9/27/18 10:42 AM, huangyy wrote:

read source image's orientation is 8, write orientation of dstpixbuf is successful and return true. But, read dst.jpg, it's orientation is null.
it's Not written?

As far as i can tell GdkPixbuf doesn't save the EXIF data to the file.

Re: pixbuf setoption not effective

On Sun, 30 Sep 2018 22:49:29 +0200, Mike Wey wrote:

On 9/27/18 10:42 AM, huangyy wrote:

read source image's orientation is 8, write orientation of dstpixbuf is successful and return true. But, read dst.jpg, it's orientation is null.
it's Not written?

As far as i can tell GdkPixbuf doesn't save the EXIF data to the file.

how to save the EXIF data to a image ?