Page 1 of 1

Saving problem with .cin image file

Posted: 2010-12-29T06:08:05-07:00
by wizards
Hello All,

I am using VC++ 2008 environment and Image magick 6.6.5 for develop my VC++ application.
In this application, i am loading .cin(Cineon Image File Format ) image file and apply some changes to image and save image.
If i can open saved image in Xnview, it shows correctly, but open same image in my application, broken image is display on screen.

i.e some left part of the orginal image is appending at right side in my saved image.

I got the image properties before and after save using identify command tool. same i am uploading here.

BEFORE SAVE:

Image: c:\2.cin
Format: CIN (Cineon Image File)
Class: DirectClass
Geometry: 1920x1080+0+0
Resolution: 72x72
Print size: 26.6667x15
Units: Undefined
Type: TrueColor
Base type: TrueColor
Endianess: MSB
Colorspace: Log
Depth: 10-bit
Channel depth:
red: 10-bit
green: 10-bit
blue: 10-bit
Channel statistics:
red:
min: 0 (0)
max: 722 (0.70576)
mean: 382.786 (0.373821)
standard deviation: 142.525 (0.139187)
kurtosis: 0.81119
skewness: -0.876469
green:
min: 0 (0)
max: 692 (0.676448)
mean: 391.76 (0.382583)
standard deviation: 133.274 (0.130152)
kurtosis: 1.69794
skewness: -1.36473
blue:
min: 0 (0)
max: 789 (0.771267)
mean: 399.169 (0.389819)
standard deviation: 153.369 (0.149777)
kurtosis: 0.17392
skewness: -0.906246
Image statistics:
Overall:
min: 0 (0)
max: 789 (0.771267)
mean: 293.429 (0.286556)
standard deviation: 210.079 (0.205158)
kurtosis: -1.39203
skewness: -0.358855
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: log(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 1920x1080+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: TopLeft
Properties:
cin:file.create_date: 2010:12:24
cin:file.create_time: 09:20:03+10
cin:file.filename: C:/03_show/hw2/reel5/hw2_r5_sc005_c024/02_final_output/02_final/02_cleanup/01_composite/hw2_r5_sc005
cin:file.version: V4.5
cin:film.frame_id: written by Nuke
cin:film.frame_position: 16777216
cin:image.orientation: 0
cin:origination.device: Created with Nuke 6.1
cin:origination.filename: C:/03_show/hw2/reel5/hw2_r5_sc005_c024/02_final_output/02_final/02_cleanup/01_composite/hw2_r5_sc005
cin:origination.model: Nuke
cin:origination.serial: 6.1
cin:origination.x_offset: 0
cin:origination.y_offset: 0
create-date: 2010-12-29T17:29:32+06:00
modify-date: 2010-12-28T05:49:20+05:00
signature: 04bd76611a3800bee5696b4b660d2eae4cbb8df28a3d512110fda73381ce7fff
Profiles:
Profile-cin:user.data: 30720 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 7.941mb
Number pixels: 1.978mb
Pixels per second: 6.658mb
User time: 0.297u
Elapsed time: 0:01
Version: ImageMagick 6.5.3-3 2009-06-04 Q16 OpenMP http://www.imagemagick.org


AFTER SAVE:


Image: c:\0001.cin
Format: CIN (Cineon Image File)
Class: DirectClass
Geometry: 1920x1080+0+0
Resolution: 72x72
Print size: 26.6667x15
Units: Undefined
Type: TrueColor
Base type: TrueColor
Endianess: MSB
Colorspace: Log
Depth: 10-bit
Channel depth:
red: 10-bit
green: 10-bit
blue: 10-bit
Channel statistics:
red:
min: 0 (0)
max: 722 (0.70576)
mean: 382.725 (0.373761)
standard deviation: 142.699 (0.139356)
kurtosis: 0.816946
skewness: -0.879021
green:
min: 0 (0)
max: 692 (0.676448)
mean: 391.7 (0.382526)
standard deviation: 133.461 (0.130335)
kurtosis: 1.70398
skewness: -1.36728
blue:
min: 0 (0)
max: 789 (0.771267)
mean: 399.115 (0.389767)
standard deviation: 153.528 (0.149932)
kurtosis: 0.180541
skewness: -0.909198
Image statistics:
Overall:
min: 0 (0)
max: 789 (0.771267)
mean: 293.385 (0.286513)
standard deviation: 210.147 (0.205225)
kurtosis: -1.39254
skewness: -0.35868
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: log(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 1920x1080+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: TopLeft
Properties:
cin:file.create_date: 2010:12:29
cin:file.filename: C:/03_show/hw2/reel5/hw2_r5_sc005_c024/02_final_output/02_final/02_cleanup/01_composite/hw2_r5_sc00
cin:file.version: V4.5
cin:film.frame_id: written by Nuke
cin:film.frame_position: 16777216
cin:film.id: 0
cin:film.offset: 0
cin:film.prefix: 0
cin:film.type: 0
cin:image.orientation: 0
cin:origination.create_date: 2010:12:29
cin:origination.device: Created with Nuke 6.1
cin:origination.filename: C:/03_show/hw2/reel5/hw2_r5_sc005_c024/02_final_output/02_final/02_cleanup/01_composite/hw2_r5_sc00
cin:origination.model: Nuke
cin:origination.serial: 6.1
cin:origination.x_offset: 0
cin:origination.y_offset: 0
create-date: 2010-12-29T15:17:08+06:00
modify-date: 2010-12-29T18:29:47+06:00
signature: 7b2e738e010deaceb30767d1086eb509c0088e0e0d3942ce3fe08bcff8bbe26d
Profiles:
Profile-cin:user.data: 32768 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 7.941mb
Number pixels: 1.978mb
Pixels per second: 6.658mb
User time: 0.297u
Elapsed time: 0:01
Version: ImageMagick 6.5.3-3 2009-06-04 Q16 OpenMP http://www.imagemagick.org


code for this:

Code: Select all

m_Image.depth(10);
m_Image.write(FileName.GetBuffer(MAX_PATH+1));
Can you please help me how to save correctly?

Thanks in Advance.

Re: Saving problem with .cin image file

Posted: 2010-12-29T06:20:53-07:00
by magick
Can you reproduce the problem from the command line with the convert program? If so, post a URL to your image and the command line you use. We'll download the image and try to reproduce the problem before we propose a solution.

Re: Saving problem with .cin image file

Posted: 2010-12-29T06:53:01-07:00
by wizards
Thanks for the quick reply.

I resize my cin file using convert tool as follows.

convert C:\BeforeSave.cin -resize 50% C:\AfterSave.cin

but same error i got. When I loaded "AfterSave.cin" into my application I am getting the same problem.

My application is giving "UnexpectedEndofFile: 'C:\\AfterSave.cin' No such file or directory @ error/cin.c/ReadCINImage/741" exception.

Image size is too large (>10MB). I will upload if it is necessary.

Avaiting for your replay.

Re: Saving problem with .cin image file

Posted: 2010-12-29T07:03:13-07:00
by wizards
Here are the links:

Before Save: http://myfreefilehosting.com/f/8f2078ee0e_7.94MB

After Save: http://myfreefilehosting.com/f/4e3e90d271_2.01MB


Thanks in Advance

Re: Saving problem with .cin image file

Posted: 2010-12-29T08:22:27-07:00
by magick
We can reproduce the problem you reported. Look for a patch to fix it in ImageMagick 6.6.6-8 available within a few days. Thanks.

Re: Saving problem with .cin image file

Posted: 2011-01-03T05:09:37-07:00
by wizards
Hello

Thank you very much.