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 760493 - Image files's content type should be guessed from MIME type on *NIX
Image files's content type should be guessed from MIME type on *NIX
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2016-01-11 20:51 UTC by Martin Blanchard
Modified: 2016-06-18 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
1/3: Move gegl_extension_handler_* to new gegl_operation_handlers_* (17.52 KB, patch)
2016-01-17 12:22 UTC, Martin Blanchard
none Details | Review
2/3: Register MIME type in loaders (20.58 KB, patch)
2016-01-17 12:23 UTC, Martin Blanchard
none Details | Review
3/3: Adapt load.c to analyse file content (8.13 KB, patch)
2016-01-17 12:24 UTC, Martin Blanchard
none Details | Review

Description Martin Blanchard 2016-01-11 20:51:50 UTC
Currently loaders determine the content type of image files by analysing their filename's extension. On *NIX, MIME type is usually prefered. Thus, on such systems, GEGL, and especially gegl:load, should probably implement a MIME type based detection mechanism.

Moreover, a datarui describe its content by declaring a MIME type (whatever the platform). MIME type analysis would thus improve datauri loading. From operations/common/load.c:

>
>// XXX: maybe file loader opts should register mimetypes also?
>
Comment 1 Martin Blanchard 2016-01-11 21:01:39 UTC
Started a proposition of implementation here: https://gitlab.com/tchaik/gegl/commits/tchaik/wip/mime
Comment 2 Martin Blanchard 2016-01-17 12:22:31 UTC
Created attachment 319209 [details] [review]
1/3: Move gegl_extension_handler_* to new gegl_operation_handlers_*
Comment 3 Martin Blanchard 2016-01-17 12:23:09 UTC
Created attachment 319210 [details] [review]
2/3: Register MIME type in loaders
Comment 4 Martin Blanchard 2016-01-17 12:24:26 UTC
Created attachment 319211 [details] [review]
3/3: Adapt load.c to analyse file content
Comment 5 Martin Blanchard 2016-06-18 09:25:30 UTC
This has been merged upstream and is now available in GEGL 0.3.8 official release. Closing as resolved.