Issue was caused by generated images had got no profile set (IB_PROFILE_NONE)
which confused OpenEXR saver (which makes sRGB conversion for profiles which
are not linear).
Actually this is much deeper issue which would require the whole color pipeline
workflow (which would happen at some point when currently urgent stuff is resolved),
but having correct profile set for generated images would still be helpful.
Not all file formats/calls are supported yet. It will be expended.
Please from now on use BLI_fopen, BLI_* for file manipulations.
For non-windows systems BLI_fopen just calls fopen.
For Windows, the utf-8 string is translated to utf-16 string in order to call UTF version of the function.
- use more logical names for strings, noticed too many strings called `str` when reviewing name patch.
- pass __func__ macro to uiBeginBlock(), quite a few names were wrong (copy/paste error).
For premultiplied alpha images, this makes any color space conversion for the image
or render output work on color without alpha multiplied in.
This is typically useful to avoid fringing when the image was or will be composited
over a light background. If the image will be composited over a black background on
the other hand, leaving this option off will give correct results.
In an ideal world, there should never be any color space conversion on images with
alpha, since it's undefined what to do then, but in practice it's useful to have
this option.
Patch by Troy Sobotka, with changes by me.
- setting the color channels on save as would ignore the channel - BW/RGB/RGBA setting.
now its used when available but still need to hide BW for formats blender can only write as color.
move these checks from creator into BKE's image.c, this way we dont need the defines for creator, scons was missing DDS, HDR & Cineon for example and nobody noticed.
details:
- setting format options from python isnt possible anymore since this isnt exposed via op->properties, python should use image.save() function instead.
- image save UI now hides 'Relative' option when copy is selected since it has no effect.
- default image depth is set to 8 or more if the image has no float buffer, otherwise its set to 32 or less.
other fixes:
- image new was adding an image with a filepath set to "untitled", if this file happened to exist in the current directory a save on the generated image would overwrite it, now initialize to empty path.
- BKE_ftype_to_imtype was returning an invalid value if ftype==0.
so path manipulation functions dont run multiple times on the same path in the case of sequence strips where the one directory is used as the base for many images.