GNOME Bugzilla – Bug 760493
Image files's content type should be guessed from MIME type on *NIX
Last modified: 2016-06-18 09:25:30 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? >
Started a proposition of implementation here: https://gitlab.com/tchaik/gegl/commits/tchaik/wip/mime
Created attachment 319209 [details] [review] 1/3: Move gegl_extension_handler_* to new gegl_operation_handlers_*
Created attachment 319210 [details] [review] 2/3: Register MIME type in loaders
Created attachment 319211 [details] [review] 3/3: Adapt load.c to analyse file content
This has been merged upstream and is now available in GEGL 0.3.8 official release. Closing as resolved.