JPEG max. dimensions limit

2,140 views
Skip to first unread message

Michel Thoby

unread,
Jun 8, 2010, 7:29:48 AM6/8/10
to pt...@googlegroups.com
Stitching and saving a 23428 x 11714 pixels output panorama:

-  in  JPEG format a PTGui Batch Stitcher Error ends the process:
<< Error: Error writing JPEG file: Insufficient memory (case 4) >>

- No problem is encountered with Photoshop large (.psb= 825MB) or TIFF (440MB) options.

Isn't the JPEG 25000 x 25000 pixels maximum dimension limit for JPEG valid any more?

Michel


Scott W

unread,
Jun 8, 2010, 10:12:04 AM6/8/10
to PTGui Support
The limit is 25K x 25K. My guess is that you ran out of scatch memory
while the jpeg was being created. When I try to go past the 25K limit
PTGui lets me know before it starts stitching.

Scott

Michel Thoby

unread,
Jun 8, 2010, 1:05:11 PM6/8/10
to pt...@googlegroups.com

II believe that there is a bug:
The problem on PTGuiPro 8.3.10. was confirmed with two more failures to save the JPEG version. i.e. no success at in five tries.
Then the same project file ran perfectly PTGuiPro 8.2.1. to a fine JPEG panorama which weighs 330 MB.

IMac i5; MacOS 10.6.3; 12 GB DDR3 RAM; 750 GB free space on 1 TB HDD.

I am presently performing (slow) the test with the same project file and source images under Windows XP (on the same machine via VMWare Fusion). If unsuccessful, I may try under Windows Vista on a PC.

Michel

Michel Thoby

unread,
Jun 8, 2010, 4:26:35 PM6/8/10
to pt...@googlegroups.com
Test results update and general recap:

1) PTGui Pro 8.3.10 (Mac) seems to warp, stitch and blend the 23428 x11714 JPEG panorama but refuses to save it on the HDD of the iMac (Snow Leopard). JPEG setting is the default i.e. Quality=100, no progressive encoding.
2) No problem with PTGui Pro 8.3.10 (Mac)  with the same project saved in PSB or TIFF on the same iMac.
3) PTGui Pro 8.3.10 (Mac) seems to warp and blend(!) the 23428 x11714 TIFF equi-rectangular panorama got at step 2) and inputted but it refuses to save it in JPEG on the same iMac. Same error message as in 1)
4) No problem with PTGui Pro 8.2.1 (Mac) on the same iMac. 
5) PTGui Pro 8.3.10 (Mac) seems to warp and blend(!) the 23428 x11714 JPEG panorama got at step 4) and inputted but it refuses to save it in JPEG on the iMac: Same error message as in 1) and 3). (*)
6) No problem with PTGui Pro 8.3.10 (Windows XP Pro 32-bits) on the same iMac.
8) No problem with the same project run with PTGui Pro 8.3.10 (Windows Vista- 32bits) on PC.
9) PTGui Pro 8.3.10 (Mac) seems to warp, stitch and blend the 23428 x11714 JPEG panorama but it refuses to save it on the HDD of a MacBook Pro (Leopard).

I  conclude that PTGui Pro 8.3.10 (Mac) seems to be affected with a bug. PTGui Pro 8.2.1 wasn't and the Windows-32 bits version isn't affected either.

(*) Replication of the anomaly is easy to do: build a 24000 x 12000 pixel source image with anything you can think of (even of uniform color if you wish). Then input this source image as an equi-rectangular image and output the "equi-rectangular panorama" of the same dimension in JPEG format!

Michel

PTGui Support

unread,
Jun 9, 2010, 3:53:07 AM6/9/10
to pt...@googlegroups.com
Hi Michel,

Thanks for the extensive testing :-) It's indeed a problem in the mac
version only, will be fixed. For the time being please use TIFF output
instead and use another application such as photoshop to convert to jpeg.

Joost

On 8-6-2010 22:26, Michel Thoby wrote:
>
> Le 8 juin 2010 � 19:05, Michel Thoby a �crit :
>>
>> Le 8 juin 2010 � 16:12, Scott W a �crit :

> --
> You received this message because you are subscribed to the Google
> Groups "PTGui" group.
> To post to this group, send email to pt...@googlegroups.com
> To unsubscribe from this group, send email to
> ptgui+un...@googlegroups.com
> Please do not add attachments to your posts; instead you may upload files at
> http://groups.google.com/group/ptgui/files
> For more options, visit this group at http://groups.google.com/group/ptgui

Jeffrey Martin

unread,
Jun 9, 2010, 7:51:30 AM6/9/10
to PTGui Support
maybe this is a dumb question, but can't someone change the jpeg spec
so that this size limit, which in 2010 is paltry and ridiculously
small, can be lifted? and various programs can decide whether or not
to pay attention to this new spec?

besides wdp (in the clutches of proprietary stagnation) there appears
to be no proper "lossy" way to store large images (except tiles, of
course).

Jeffrey

Matthew Rogers

unread,
Jun 9, 2010, 8:12:19 AM6/9/10
to pt...@googlegroups.com
On 9 Jun 2010, at 12:51, Jeffrey Martin wrote:

besides wdp (in the clutches of proprietary stagnation) there appears
to be no proper "lossy" way to store large images (except tiles, of
course).

Ah, TIFF with it's two types of compression, maybe ?

Jeffrey Martin

unread,
Jun 10, 2010, 8:22:51 AM6/10/10
to PTGui Support
tiff with jpeg compression only works up to 25 thousand pixels.

tiff lzw / zip compression is lossless (i believe) and produces very
large files (smaller than uncompressed, but still huge)

so, can anyone else answer this question?

PTGui Support

unread,
Jun 10, 2010, 8:28:44 AM6/10/10
to pt...@googlegroups.com
What about JPEG2000?
And microsoft's HD Photo format?
Also it would not be too difficult to design a format based on tiled
jpeg segments.

The problem is that a file format is not very useful if it's not widely
supported.

Joost

Jeffrey Martin

unread,
Jul 7, 2010, 11:23:30 AM7/7/10
to PTGui Support


On Jun 10, 2:28 pm, PTGui Support <supp...@ptgui.com> wrote:
> What about JPEG2000?
> And microsoft's HD Photo format?

yes, that's WDP.


> Also it would not be too difficult to design a format based on tiled
> jpeg segments.
>
> The problem is that a file format is not very useful if it's not widely
> supported.

yes of course. seems like the demand should come any time now :)

Joergen Geerds

unread,
Jul 7, 2010, 1:34:43 PM7/7/10
to PTGui Support
On Jul 7, 11:23 am, Jeffrey Martin <360cit...@gmail.com> wrote:
> On Jun 10, 2:28 pm, PTGui Support <supp...@ptgui.com> wrote:
> > And microsoft's HD Photo format?
> yes, that's WDP.

WDP or HDP (microsoft HD photo) has some limitations: while the height
and width (px) are stored in 32bit variables, the max file length is
also stored in a 32bit value (4GB max file size, same as mod TIFF).
unless MS works on the specs, and makes the format more widely
accepted/usable, I don't think there is much to it. it's easier to use
tiff instead.

as far as I can tell, bigtiff specs allow for a jpg/jpg2000 type
compression (among other lossless compressions), which would allow
terapixel files to be jpg compressed, as well as floating point
representations. if adobe and others would support bigtiff sometime
this year, it would be really helpful for so many people.

joergen

Roger Howard

unread,
Jul 7, 2010, 4:42:25 PM7/7/10
to pt...@googlegroups.com
On Thu, Jun 10, 2010 at 5:22 AM, Jeffrey Martin <360c...@gmail.com> wrote:
> tiff with jpeg compression only works up to 25 thousand pixels.

According to what? Photoshop seems to impose the following two rules
on TIFF saving:

1. Before the actual save, it makes sure the pixel dimensions are 30k
or less in each axis.
2. During save (since the image tiles will be encoded/compressed) the
final result must be less than the 4GB limit imposed by the current
TIFF format.

TIFF will happily store up to 4GB of image samples - encoded however
you'd like - since it uses 32bit offsets. A 4GB JPEG is pretty
enormous.

Some implementations of TIFF may well be restricted in arbitrary ways,
but something using libtiff for TIFF support should work

A JFIF (JPEG file) itself is limited, I believe, to 65k pixels on each
axis... but JPEG-encoded TIFFs shouldn't have this limitation - their
limit is the size of the encoded image data, not pixel dimensions.

Note: many applications impose their own, seemingly arbitrary
restrictions - for instance, Photoshop will not provide JPEG as a Save
option if your dimensions are greater than 30,000px on either axis,
despite that being well within the JPEG/JFIF spec.

JPEG 2000 may be a good candidate, if you want extremely high
resolution lossy (or lossless) image storage - the format is modern
enough that the size limits are way outside of current needs... IIRC,
each tile needs to be <2GB, and there can be 2^32 tiles in each
JPF/JPX. However, like with other formats, few tiles fully support the
file format and instead impose arbitrary limits.

In the near future I'm hoping to see BigTIFF support finally picked up
by Adobe, but again there's a difference between supporting the format
but with some arbitrary restrictions (as Adobe almost always does) and
fully supporting it.

l_d_allan

unread,
Jul 9, 2010, 5:44:52 PM7/9/10
to PTGui Support
On Jul 7, 2:42 pm, Roger Howard <rogerhow...@gmail.com> wrote:

> JPEG 2000 may be a good candidate, if you want extremely high
> resolution lossy (or lossless) image storage - the format is modern
> enough that the size limits are way outside of current needs

I briefly used JPEG2000 with Photoshop CS4, and found it to be very
slow. Perhaps I was doing something wrong, or had a non-optimal
driver?

JPEG2000 does have the useful capability of supporting transparency,
which was why I was evaluating it.

Roger Howard

unread,
Jul 12, 2010, 2:39:08 PM7/12/10
to pt...@googlegroups.com
On Fri, Jul 9, 2010 at 2:44 PM, l_d_allan <lynn.d...@gmail.com> wrote:
> On Jul 7, 2:42 pm, Roger Howard <rogerhow...@gmail.com> wrote:
>
>> JPEG 2000 may be a good candidate, if you want extremely high
>> resolution lossy (or lossless) image storage - the format is modern
>> enough that the size limits are way outside of current needs
>
> I briefly used JPEG2000 with Photoshop CS4, and found it to be very
> slow. Perhaps I was doing something wrong, or had a non-optimal
> driver?

I don't use it frequently, but I'd be surprised if it was much slower
than compressing the same image as TIFF/ZIP, for instance. I wouldn't
be very surprised, however - JP2000 hasn't gotten much love over the
years, so I don't expect Adobe puts much into improving their file
format module.

Reply all
Reply to author
Forward
0 new messages