After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629146 - Guide to writing babl extensions
Guide to writing babl extensions
Status: RESOLVED OBSOLETE
Product: GEGL
Classification: Other
Component: babl
git master
Other All
: Normal enhancement
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2010-09-09 09:17 UTC by Rupert Weber
Modified: 2018-05-22 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Extension guide (39.62 KB, patch)
2010-09-09 09:17 UTC, Rupert Weber
none Details | Review
Updated draft for extension guide / howto (48.54 KB, patch)
2010-09-19 16:10 UTC, Rupert Weber
none Details | Review
Another update (49.05 KB, patch)
2010-10-01 12:57 UTC, Rupert Weber
needs-work Details | Review

Description Rupert Weber 2010-09-09 09:17:09 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)
Comment 1 Øyvind Kolås (pippin) 2010-09-09 14:50:17 UTC
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.
Comment 2 Rupert Weber 2010-09-19 16:10:31 UTC
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
Comment 3 Rupert Weber 2010-10-01 12:57:12 UTC
Created attachment 171488 [details] [review]
Another update

Update to the guide, main addition is the reference vs. shortcut conversion.
Comment 4 Jon Nordby 2011-03-28 22:56:05 UTC
Could you update the patch now patches to bug 628561 has been committed, and split out the CSS change in a separate patch?
Comment 5 Tobias Mueller 2012-01-19 20:21:11 UTC
Rupert, ping
Comment 6 André Klapper 2012-02-14 09:25:42 UTC
[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.]
Comment 7 Tobias Endrigkeit 2012-10-14 18:47:33 UTC
Only Update for the Patch is needed, there is no missing information of the bug
Comment 8 GNOME Infrastructure Team 2018-05-22 12:05:14 UTC
-- 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.