[Development] [Interest] Imageformats v2

Konstantin Ritt ritt.ks at gmail.com
Wed May 20 19:54:45 CEST 2015

2015-05-20 19:27 GMT+04:00 Иван Комиссаров <abbapoh at gmail.com>:

> 2015-05-20 15:18 GMT+03:00 André Somers <andre at familiesomers.nl>:
>>  I think that it makes sense to attempt to load a header if it exists.
>> If not... Not sure. Probably need to read the entire file in order to
>> determine what it contains?
> Any other opinions? I vote for dropping separate header reading:)

I see two bold options: 1) open and read lazily, chunk-by-chunk (where
possible); 2) s/open/setPath|setDevice/ and read just everything.

>    I would not like it much if information is silently dropped. If you
>> make the conversion explicit, it is also explicit what features are
>> available for the type you have now. How else are you going to expose that
>> information?
> I'm not sure, but typically one knows the type of the document only when
> saving (i.e. file is opened, user changes it, than calls "save" dialog).
> You don't know which format the document will be saved. IMHO.

ImageDocument doc;
doc.mimeType() // <-- invalid, nothing to save
doc.addResourse(Resource(img), ..);
doc.suitableMimeTypes() // <-- i.e. mime types for which the pixel format
[and possible metadata] are supported, makes sense for save dialog, etc.
doc.addResourse(Resource(img2), frame=1, ..);
doc.suitableMimeTypes() // <-- now we have frames, the mime types list
doc.suitableMimeTypes() // <-- ...and mipmaps => image/x-dds?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150520/9db4991f/attachment.html>

More information about the Development mailing list