Re: [CinePaint] Really basic script for batch converting

Bob Friesenhahn <[email protected]> Tue, 24 Nov 2009 19:27:31 -0600 (CST)
Newsgroups gmane.comp.video.cinepaint.user
Message-ID <[email protected]>
On Wed, 25 Nov 2009, [email protected] wrote:
>
> I've read both GM and IM documentation online but can't find either
> duplicate layer or add noise?

GraphicsMagick does not normally use "layers" although it is possible 
to simulate Photoshop layers as multiple images and then use -flatten 
to flatten to one layer.

GraphicsMagick can otherwise do all that is requested except that it 
is not possible to save an ICC profile in DPX since DPX does not 
define a standard way to do it.  Unless you need the unique features 
of DPX (mostly its special header with useful things like timecode, 
YCbCr video encoding sub-formats, or Cineon Log space), you may be 
better off using a common format like 16-bit integer TIFF which is 
usable by more common applications, and which supports ICC profiles. 
16-bits/sample is more than enough to support any viewable image 
without loss.  The ICC profiles will allow better interoperability 
with CinePaint or Photoshop.

Using GraphicsMagick and to add 6.5% of gaussian noise to all color 
channels you can do

   gm convert input.ppm -operator all Noise-Gaussian '6.5%' output.ppm

or to transform many files in-place:

   gm mogrify -operator all Noise-Gaussian '6.5%' file*.ppm

You can also specify individual channels to operate on and use many 
-operator commands in the same command line so that you could apply 
differing amounts of noise to different channels.  See the 
documentation for more.

> Stepping back. With maintaining as much quality as possible from camera
> HDV (mpeg2) transport stream files in mind and the YCrCb to RGB conversion
> being lossy would it make more sense to go from mpeg2 -> Image format
> supporting YCrCb -> Upsample to 4:2:2 (Beneficial??) -> Convert to 16bit
> -> Convert to RGB Full Range No remapping -> then continue from 2. above.

RGB to YCbCr is lossy.  The video YCbCr to RGB path should not be 
lossy. 4:2:2 is still lossy since it discards color resolution.  If 
you have the option, you should always edit in RGB space and only 
convert to YCbCr for the final output.  Except for special video 
editing software, most image processing software will work in RGB 
space and sometimes in special colorspaces ideal for editing.

Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
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