I have the following problem: When generating a thumbnail for an ORDImage using the processCopy() method, it works fine for a file size up to ~3 or ~4MB. However, I uploaded a jpg image of 7.6MB and let the thumbnail be automatically (stored procedure) be generated. For that image, an exception is raised:
ORA-29400: data cartridge error IMG-00003: exhausted memory while processing image.
Now, I read that increasing the JAVA_POOL_SIZE would solve the problem. So I tried various settings between 24 (Standard) and 96MB. But even the 96MB setting was not enough, the exception was raised again. Do you know what would be a good JAVA_POOL_SIZE setting for an image of such a size? On top of that, I cannot predict how big the images will be, that will be uploaded later on. Is there another way to solve this without increasing JAVA_POOL_SIZE to an astronomic value? If a thumbnail generation for a 3MB image works with a 24MB Java pool size, and generation for a 7MB image doesn't work with 96MB, then there is clearly no linear memory increase. That's my worry.
Thanks in advance, I'd really appreciate your help.
There is a table in the file ord/im/admin/README.txt which indicates the maximum image sizes that Multimedia can decode (read) or encode(write) for various image formats.
I'm including that part of the file below (10.2.0.3 version). Note, that tuning the JAVA_POOL_SIZE will not change this maximum values. Also, in 11g the limit for decoding JFIF (jpg) format images has been raised to 46000x46000.
Oracle interMedia provides image processing functions that change image
content. For example, you can scale and crop an image or convert it to
a different file format. Processing an image requires Oracle interMedia
to interpret the pixel values of the image, which is often processor
and memory intensive. Subsequently, Oracle interMedia may not be able
to successfully process images that it can successfully store. The
maximum image size that interMedia can process depends on the image
format and the system platform.
Table 1 shows the maximum image size, expressed in pixel dimensions of
width x height, that Oracle interMedia can process for various image
formats on a 32bit platform. Table 2 shows the same limits for a 64bit
In both Table 1 and Table 2, a limit of 3300x3300 means that any image
can be processed so that the product of its width and height is less
than or equal to the product of 3300 and 3300 (10890000).
Note: The values in Table 1 and Table 2 are conservative limits. They
do not reflect the fact that the space required is a function of image
format, content format, and compression format nor do they reflect
future product development efforts.
Table 1. Maximum image size for processing, 32bit platform.
ImageFormat decoding(reading) encoding(writing)
BMP 4700 x 4700 Unlimited (subject to resource constraints)
FPIX 4700 x 4700 No write support
GIFF 8000 x 8000 4700x4700
JFIF 4700 x 4700 4700x4700
PCXF 4700 x 4700 No write support
PGMF 8000 x 8000 Unlimited (subject to resource constraints)
PICT 4700 x 4700 10000x10000
PNGF 4700 x 4700 4700x4700
PNM/PPM 4700 x 4700 Unlimited (subject to resource constraints)
RASF 4700 x 4700 No write support
TGAF 4700 x 4700 10000x10000
TIFF* up to 2GB up to 2GB(subject to resource constraints)
*For each single strip(block or page) in a TIFF image, up to 4700x4700.
Table 2. Maximum image size for processing, 64bit platform.*
ImageFormat decoding(reading) encoding(writing)
BMP 9600 x 9600 Unlimited (subject to resource constraints)
FPIX 9600 x 9600 No write support
GIFF 16300 x 16300 9600 x 9600
JFIF 9600 x 9600 9600 x 9600
PCXF 9600 x 9600 No write support
PGMF 16300 x 16300 Unlimited (subject to resource constraints)
PICT 9600 x 9600 20000x20000
PNGF 9600 x 9600 9600 x 9600
PNM/PPM 9600 x 9600 Unlimited (subject to resource constraints)
RASF 9600 x 9600 No write support
TGAF 9600 x 9600 20000x20000
TIFF** up to 2GB up to 2GB(subject to resource constraints)
* The limits on 64bit platforms are calculated values, not empirical
**For each single strip(block or page) in a TIFF image, up to 9600x9600.
I have some problem, when try to run applyWatermark on image in shared server connection mode. (in dedicated mode works fine)
ORA-29400: data cartridge error
IMG-00003: exhausted memory while processing image
IMG-003: out of memory in (native) awt jpeg decode
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 1460
ORA-06512: at "ORDSYS.ORDIMAGE", line 211
ORA-06512: at line 37
The complete test here: https://docs.google.com/open?id=0B0jDbRwf7R2QaE5qM3NacjVnUmM
select pool, name, bytes
2 from v$sgastat
3 WHERE POOL = 'java pool';
POOL NAME BYTES
------------ -------------------------- ----------
java pool free memory 783360320
java pool JOXLE 52125696
java pool joxs heap 1919232
java pool ioc_make_sub2 1455552
Since it works fine in dedicated mode, can you check the following:
- Can you check your PGA and ensure that it is not used up by something else?
- Are you able to do other operations on this image (such as use processCopy to convert to a different format)?
- Are you able to create thumbnails for other images - is this the only image that is failing or are all images failing?