| While playing
around with some of the GDI+ classes to manipulate pictures from my digital
camera, I found that if you want to add or modify an image description
of an EXIF image file (EXIF
= JPEG
plus additional information) you can read
and write the image description with the PropertyItem data
structure. These PropertyItems are very useful to avoid the bit manipulating
in
the file structure of an exif file.
But the problem is:
when writing the image with the changed or new description the picture
part becomes recompressed. You can notice this from the file
size; you add information to the file and the file size decreases. When
you
repeat
changing the description, the image become more and more poor, because
jpg is a lossy compression. So how do you load and save an jpg or exif
file without recompressing the bitmap?
The trick
is to rotate the picture by 90 degrees. In this case the framework supplies
a lossless rewriting of a jpeg file:
|