Re: [CinePaint] Really basic script for batch converting.

Frank Peters <[email protected]> Mon, 23 Nov 2009 14:14:29 -0500
Newsgroups gmane.comp.video.cinepaint.user
Message-ID <[email protected]>
On Mon, 23 Nov 2009 16:44:17 -0000 (GMT)
[email protected] wrote:


With 8-bit data such "gaps" are to be expected, although they are not
inevitable.  Contrast adjustment involves remapping the pixel levels
into a new range.  The result of such a mapping is that pixel values
that were formerly close in value (e.g. 50, 51) could become mapped to
values that are further apart (e.g. 100, 110).  This is what causes
the histogram "gaps" and they are not necessarily something that should
be avoided.

If the contrast is adjusted too severely, some pixel values may become
too far apart and that could cause visible banding to appear in the
resulting image, but such banding cannot usually be predicted from
examining histogram gaps.

In short, if the image looks good, the histogram gaps are irrelevant
 

> I've read that when these 8bit images are taken into Adobe After Effects,
> no doubt Photoshop as well and a 16bit or better project workspace is
> adopted it is said that, "something miraculous happens, the gaps (to the
> histogram) have disappeared, what's happened is the old colour values have
> been freed from the 8bit restriction and moved freely into the new range
> (16bit) evenly distributing themselves"
> 

If the gaps in a histogram have disappeared, then the image has,
of necessity, been altered, possibly drastically.

A histogram is only a record of the pixel intensities.  It shows
how many pixels of a certain level exist within an image.  Gaps
in the histogram simply mean that intensity levels don't exist
within a certain range and that is not necessarily a bad thing.

But a histogram cannot be interpolated to make it "gapless" and
"smooth."  That would entail removing some pixel intensities
and adding others that didn't originally exist.  It would
constitute a drastic alteration and distortion of the original
image.

When converting from 8-bit to 16-bit you are going to get gaps.
For example, pixels 100 and 101 will be converted into 25600
and 25856.  The gaps will be even greater when converting to
32-bit.  Those gaps cannot be "interpolated" or "filled in"
without totally destroying the original image.  But they are
also of absolutely no consequence.

> 
> So that's where I'm at, trying to massage my 8 bit video files into a
> 32bit precison environment for compositing and colour correction.
> 

The only file formats of which I am aware that possess a straight 
32-bit FP RGB format (i.e. no HDR) are TIFF, PFM, and FITS.  Your 8-bit
files should be converted to one of those.  For TIFF and PFM there
are command line programs available (NetPBM and GraphicsMagick).
For FITS I don't know.

But will your other software accept any of these formats?
That is the important question.

Frank Peters

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july