We don't care what the original image type is, because non-RGB images
(in particular indexed ones) render very badly.
gimp_layer_new_from_drawable() will automatically convert the original
layer's type to the destination image's type (RGB) while copying.
The new by-row iteration doesn't re-write the length
value for each row. In general it is not safe to modify
the iterator data because the internal logic depends
on the public data, but this specific case is new.
Currently PNG "comment" is saved in iTXt (UTF-8) if supported, tEXt
(ISO-8859-1) otherwise. The problem is that some software out there like
ImageMagick would apparently only read tEXt comments.
Therefore the replacing algorithm is:
1/ if we would not lose any character in a conversion from UTF-8 to
ISO-8859-1, we save in tEXt, whether or not the platform supports iTXt.
2/ if we would lose comment data in the conversion while iTXt is
supported, we save in iTXt.
3/ if iTXt is not supported, we save in tEXt anyway and discard any
non-convertible character, unless the finale result is an empty string
(in which case, we don't save any comment).
Allow ranges from -10000 to 10000, still arbitrary but more
real-world. The scales still go -1000 to 1000, but the spinbuttons
allow for the full range.
Other allocated data is allright because it is freed when the process
exits, but not GEGL buffers created with gimp_image_new(), because they
are managed by the main GIMP process. Otherwise the plugin would leak
GeglBuffers each time it is closed.
It's about importing in fact.
Parse BITMAPV4HEADER / BITMAPV5HEADER and use GIMP's BMP
implementation instead of using gdk_pixbuf.
Also, remove an old hack about 32bits bmp v3 + alpha. The alpha
channel is already ignored in that case.
- Takes 2048 samples instead of 256 to handle properly large palettes.
It gives also better results with gradients.
- linearly interpolate values between two samples when
mapping with a gradient, to handle properly float precision.
- Add all missing decompositions needed for compat
- There are still some noticeable differences with the old plugin
(YCbCr mainly)
- decomposition of alpha is not coherent with gimp's current behaviour.
It still needs to be discussed.
- clamping is only here for compat, but it's probably not really needed.
- Others decompositions can now easily be added.
- compose.c remains unported