GNOME Bugzilla – Bug 629146
Guide to writing babl extensions
Last modified: 2018-05-22 12:05:14 UTC
Created attachment 169838 [details] [review] Extension guide First draft of a guide to writing babl extensions, still quite a few questions open. (This first patch also includes the two small patches I posted to #628561, because I was too lazy to convince git to apply without them)
Comments for the editnotes, it would have been easier to reply to these, in context if the questions were asked on the mailinglist rather than embedded in a patch. linear, plane, planar "linear" is for converting a buffer of n pixels with a given pixel format, the pixels are expected to contain the components packed/interleaved/chunky in the order specified in the pixel format. "plane" is for converting a single plane, this can be used internally by babl when constructing reference/fallback conversions, it allows doing processing on one and one component and as guessed with individual pitch changes (to skip the other components if needed). "planar" is for converting full images where the components might be stored separately, like it is done for some YCbCr formats in video compression (where the dimensions of the images for the Cb and Cr components might be smaller than the Y image), this feature in babl is not used by GEGL and migh not be completely functional. ... yes, you should re-register color models and used pixel formats in extensions that are not present in the babl-base, since the order extensions are loaded in are not guaranteed. ... the use of babl_type_new and ... "integer", "unsigned" indeed seems to be wrong. .. the return value of conversion functions was intended to be the number of samples actually converted, the value is not really used anywhere in babl though and could probably be removed and be made void. .. the "chroma", "alpha" and "luma" flags/component meta data have no use inside babl but can be useful in determining behavior for image processing algorithms in a manner that is independent of the actual color model used. At one point it was also used to detmine whether conversion would incurr a loss of "features" thus blacklisting possible multi-step conversion paths, this is now achieved through other means.
Created attachment 170599 [details] [review] Updated draft for extension guide / howto Updated the guide. Still needs some work, but I think it's slowly getting there. (still includes the two small patches to bug 628561) For a quick peek without patching, it's also posted to http://leguanease.org/gimp/babl/docs/extension-guide-main.html
Created attachment 171488 [details] [review] Another update Update to the guide, main addition is the reference vs. shortcut conversion.
Could you update the patch now patches to bug 628561 has been committed, and split out the CSS change in a separate patch?
Rupert, ping
[Setting QA Contact to 'bugs at gegl.org' so people interested in following GEGL bug reports' changes can still follow if the assignee changes to a real person.]
Only Update for the Patch is needed, there is no missing information of the bug
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gegl/issues/10.