Large Format psb to bmp file size query

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
HardArt

Large Format psb to bmp file size query

Post by HardArt »

I have converted a large format psb file to a bmp using ImageMagick, but file size is not as i expected.
Am I usiong an incorrect formula?

Its an 8 bit grey scale 1000 x 4800 mm image at 300ppi which equates to 11,811 x 56693 pixels
So 11,811x56,693x8/8/1024 = 653,908Kb expected file size? File size keeps coming out at 330,449? Am i wrong in my expectation?

mm in dpi pixels bit
1000 39 300 11811 8
4800 189 300 56693
Expected 653,908 kb
Actual 330449 kb

Whats more none of the programs are recognising it?

Is there an easy way of dividing the file in 2 along its length, I know the programs should be able to recognise it then and this would be a good check.

The conversion happened on a 64bit system, would this cause it to half its size?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Large Format psb to bmp file size query

Post by magick »

PSB support is quite new and there could still be unanticipated problems. Post a URL to your PSB image. We need to download it and reproduce the problem before we can offer any help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Large Format psb to bmp file size query

Post by fmw42 »

Its an 8 bit grey scale 1000 x 4800 mm image at 300ppi which equates to 11,811 x 56693 pixels
So 11,811x56,693x8/8/1024 = 653,908Kb expected file size? File size keeps coming out at 330,449? Am i wrong in my expectation?
I think your calculation above may be incorrect. I don't know why you divide by 8 unless you are converting to KB (kilo bytes).

1000*(1/25.4)*300 = 11,811
4800*(1/25.4)*300 = 56,692

so 11811*56692 pixels at 8 bits/pixel divided by 1024 to convert to Kbits = 5,231,165 Kb

However, if you really have KBytes, then

11811*56692 pixels at 1 byte/pixel divided by 1024 to convert to KB = 653,895 KB which is about twice what you say you are getting for a result.

Also some definitions of kb involve 1000 rather than 1024.

Is there some compression involved? Do you really have 8-bits grayscale and not 4-bits?


The header for a BMP2: format only allows the description of the width,
height and bit depth (bits per pixel) of an image. The bit depth can be one of
1, 4, 8 or 24.

For comparison, the bmp3: format allows bit depths of 0, 1, 4, 8 ,16, 24 and
32 and has extra fields which specify x and y resolution (in pixels per metre)
and compression of the image data.

see http://www.imagemagick.org/Usage/formats/#bmp
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Large Format psb to bmp file size query

Post by snibgo »

Perhaps IM thinks only 4 bits are needed per pixel, so writes it in that BMP format. But this isn't a common format, which might explain why other programs can't read it.

For each file, try "identify -verbose x.bmp" etc.
snibgo's IM pages: im.snibgo.com
HardArt

Re: Large Format psb to bmp file size query

Post by HardArt »

Magick, could you look at this file for me

panel2.psb (232.13MB)

http://www.filefactory.com/file/b0bc8d7/n/panel2.psb
When its converted to a bmp file what size is it it? ie height x width in pixels, 8 bit greyscale?

My main aim is to try and get imagemagick up and running on ubunto or some other operating system to be able to do some manipulations on it, hence my post earlier about installing IM.
I did do a conversion a couple of weeks ago using IM on the new pc and windows 7 before anything else was loaded, but I couldnt open the resulting bmp file and it was smaller than expected, so am wondering if you get a better result.

Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Large Format psb to bmp file size query

Post by snibgo »

When I download panel2.psb, it is only 25,645 bytes. It is an HTML file that says, among other things, "panel2​.psb 232.13 MB file uploaded 2 weeks, 6 days ago."
snibgo's IM pages: im.snibgo.com
HardArt

Re: Large Format psb to bmp file size query

Post by HardArt »

I'll try & get it uploaded again tomorrow, unfortunately i'm running from a mobile broadband here.
Thx for letting me know
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Large Format psb to bmp file size query

Post by magick »

Unfortunately the BMP writer wants to allocate entire image in memory whereas a great majority of images only require a scanline of pixels at a time. We resized your image and it converted without complaint:
  • convert -limit area 1 panel2.psb -resize 10% panel2.bmp
We could also convert the full sized image to a format that supports a scanline at a time processing:
  • convert -limit area 1 panel2.psb panel2.pnm
Post Reply