Global Mapper v25.0

Unable to open JPEG2000 files in Photoshop

bcastello
bcastello Global Mapper User
edited September 2008 in Raster Data
The attached file was created with Global Mapper 10, but CS3 gives an error message:

Could not complete your request because of a program error. I downloaded IRFAN viewer and got a similar result.

Comments

  • global_mapper
    global_mapper Administrator
    edited September 2008
    The file seems to load fine in both Global Mapper and the ER Viewer application from ERMapper. Perhaps the problem is with Photoshop and Irfan Viewer?

    The file does contain nearly 800 million pixels of data at the most detailed zoom level, which equates to over 2GB of uncompressed data. Many applications attempt to read an entire file into memory rather than read the data from disk as needed, which would present problems with files this large. You might try a smaller export and see if that works. If so, that would point to the uncompressed size of the data in the file as the issue in the other applications.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • bcastello
    bcastello Global Mapper User
    edited September 2008
    I opened the file in question in Global Mapper, then tried to re-export it (again as JPEG2000) tiled into 10 rows by 6 columns. Photoshop still gives the same error:
    Could not complete your request because of a program error.

    Then I canceled the export of the tiles and got this message:
    Unable to generate ECW file.
    User cancelled compression
    ECWOverlay.cpp - 1507
    Build Time: Aug 27 2008 20:50:51

    Is ECW compression being applied inside a JPEG2000 file? Might this be the reason Photoshop does not know how to deal with it?
  • global_mapper
    global_mapper Administrator
    edited September 2008
    ECW compression is not being used in the JPEG2000 file, it is just that the same library is being used for both ECW and JPEG2000 compression, so they share some error messages. The error messages just need to be corrected to display the correct text depending on the actual export type.

    Have you tried the smaller files in IrfanView? I tried the large file in IrfanView and was able to see a small preview of the image, but got an out of memory error when I tried to fully open it. I then exported out a new JPEG2000 file from a small chunk of the original and it loaded into IrfanView just fine, so the file seems to be fine. Are you sure that Photoshop supports the JPEG2000 format?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Matt
    Matt Global Mapper User Trusted User
    edited September 2008
    For what it's worth, that file won't open in ACDSEE either. I tried exporting a small area of the map with GM, and it opened just fine in ACDSEE. Also, I don't believe Photoshop CS3 supports JPG2000 out of the box. Not sure why, you'd think it would.
  • bcastello
    bcastello Global Mapper User
    edited September 2008
    30 minutes on the phone with Adobe: They are unable to open the files generated in Global Mapper either. They had me open a file and save it from within Photoshop in JPEG2000 format, then re-open it. We did that twice - on a small file and a large one. No problems. Last thing they said was that JP2000 was an "obsolete" format and that I should perhaps try exporting them in a different format from my other application.
  • global_mapper
    global_mapper Administrator
    edited September 2008
    That is strange, I've never heard anyone refer to the JPG2000 format as "obsolete". It is just now beginning to see widespread use. I'm not sure what they would suggest as an alternative to get that kind of compression ratio as the ECW and MrSID formats are even older than JPG2000.

    If you have Global Mapper v10 you can try saving as a GeoTIFF which will create a new BigTIFF format file due to the file size. Perhaps Adobe software can handle that.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • bcastello
    bcastello Global Mapper User
    edited September 2008
    This file was exported with JPEG compression. It can be loaded in Global Mapper as a layer, but when opened in Photoshop CS3, the program does nothing until you try opening it again - at which time the program crashes.

    This is similar to the same problems I was having with large JPEG2000 files, except instead of crashing, I got an error message.

    The image is 64,845 x 21,615 pixels.
  • global_mapper
    global_mapper Administrator
    edited September 2008
    I believe the problem is related to the pixel dimensions of the file. Most image applications decompress files into memory to work them. For a file with your dimensions, the full uncompressed size would be nearly 4GB! This is way too much for most systems to allocate and would result in those applications being unable to load the files.

    Global Mapper reads data from disk as needed and just caches part of the files in memory for speed, which allows it to work with files regardless of size.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • bcastello
    bcastello Global Mapper User
    edited September 2008
    This file is the same dimensions as the previous one I was having trouble with, but instead of exporting it from Global Mapper, I used ER Mapper to create it. It loads in both Photoshop and Global Mapper. Perhaps you can inspect it to find out what is different about it? It's the same LARGE dimensions as before 64,150x21,269, but without any compression applied. Is it possible the JPEG compression GlobalMapper uses inside GeoTIFF might somehow be going beyond limits when the spatial dimensions of the file get so large?

    I'm unable to upload the file: ERROR MESSAGE
    Fatal error: Out of memory (allocated 33292288) (tried to allocate 26714626 bytes) in /home/ptocknel/public_html/globalmapperforum/forums/includes/class_dm.php on line 418
  • global_mapper
    global_mapper Administrator
    edited September 2008
    Are you using the JPG-in-TIFF option when generating your file from Global Mapper? There are a lot of applications that do not support JPEG-in-TIFF compressed files. You might try generating your file from Global Mapper without that option selected by just using the plain 24-bit RGB export option to see if that makes any difference. You might also uncheck the LZW compression box to just create an uncompressed TIFF file.

    I'm guessing that your file is too large to upload to the forum.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com