This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Support for digital Cinema/film DPX and Kodak Cineon image file formats in imghdr module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, iritkatriel, waltermb
Priority: low Keywords: patch

Created on 2009-07-16 21:28 by waltermb, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
imghdr_dpx_cineon_support.py waltermb, 2009-07-16 21:28 lines to add to imghdr.py module for implementation
Messages (4)
msg90587 - (view) Author: Walter Arrighetti (waltermb) Date: 2009-07-16 21:28
In the Digital Intermediate (DI) post-production world, as well as in
digital cinema/film technologies, video frames -especially those coming
from a film scanner- are stored in sequences of image files, whose two
primary formats are the Digital Picture Exchange (DPX,
http://en.wikipedia.org/wiki/DPX) and the Kodak Cineon
(http://en.wikipedia.org/wiki/Cineon).
This proposal of lines addiction only to imghdr module allows to
properly test DPX and Cineon files for validity, with imghdr.what()
returning either 'dpx' or 'cin' strings if either is found.
msg90611 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-07-17 08:19
I can't judge the content of the patch because I don't know these
formats at all, however there are a few issues about the style:
1) there are tabs mixed with spaces, the standard is 4 spaces;
2) there should be an empty space before and after operators like ==, <
and >;
3) h and f are not really meaningful names, I can't figure out what they
are supposed to represent.
For further information about the style conventions see
http://www.python.org/dev/peps/pep-0008/

The "import struct" might be better at module level; 'f' is passed to
both the function and never used; the docstrings may be more comprehensive.

Finally, it would be nice if you could provide a patch against the
trunk, you can find more information about it on
http://www.python.org/dev/patches/ and
http://www.python.org/dev/faq/#patches

If you have any question feel free to ask.
msg90673 - (view) Author: Walter Arrighetti (waltermb) Date: 2009-07-18 12:13
DPX and Kodak Cineon are the two professional raster image formats used in
digital cinema/film post-production facilities to professionally store video
frames, usually using RGB, YUV or XYZ colour-spaces with 10,12,16 or 32 bits
per channel. They have two functions:

   1. They store complete colorimetry information in order to guarantee
   perfect colour reproduction across different media (monitors, projectors,
   paper and film stock). In particular they are used when conversions between
   original negative film to print film (for theatrical releases) require
   colours stored as film density, which is a nonlinear function compared to
   linear colour spaces used for video
   2. They are to cinema like RAW images are to photography: using such high
   color depths it is possible to store even the slightest lightness/colour
   differences in order for post-production to better manage color corrections
   and VFXs

Thanks for the support: it is my first post here. I'll read the patches
section and send a diff file for the original imghdr.py module.

I apologize for mixed tab/space indents: I checked for them (I use \t's) but
apparently missed some. As far as h and f they are pretty useless names for
me too, but was just adapting to the names in the core imghdr.py module
(which also imports modules within the functions).
msg415049 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-03-13 17:18
imghdr is deprecated as per PEP 594, so there won't be further enhancements to it.
History
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50746
2022-03-13 17:18:14iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg415049

resolution: wont fix
stage: resolved
2020-11-15 23:29:31iritkatrielsettype: behavior -> enhancement
versions: + Python 3.9, Python 3.10, - Python 2.7, Python 3.2
2013-02-15 15:07:58r.david.murraysetfiles: - unnamed
2009-07-18 12:13:16waltermbsetfiles: + unnamed

messages: + msg90673
2009-07-17 08:19:43ezio.melottisetpriority: low
versions: - Python 3.0, Python 3.1
nosy: + ezio.melotti

messages: + msg90611

keywords: + patch
2009-07-16 21:28:48waltermbcreate