jp2000 errors when the image has a lot of black pixels

danielekdanielek Global Mapper UserPosts: 15

With Global Mapper I have always had problems with jp2000 files when the image I am opening is projected, and is therefore surrounded by huge black surfaces. At some zoom levels the image appears totally black, at other zoom levels Global Mapper displays a series of vertical stripes. This problem usually disappears when I crop the image to remove the black edges.

1. Cropping the image to remove black edges is sometimes very much time consuming because when the whole image appears black, one needs first to guess where the non-black area is located in order to define the plausible but hypothetic zone of interest. Once the image is cropped, it displays ok and with successive attempts to move its corners it is possible to finally end up with the right cropped surface area. All this seems to be due to a problem of jp2 image display when there is too much black inside. Is there something I miss, or could it be improived in a future release....?

2. Today I had an additional problem with several such images. Doing like I explained in (1) I got my cropped jp2 images. But zooming at 1:1 results in the following error. It is embarrassing, I cannot look at the image at full resolution or zoom to check some details. Is there anything I can do?

Error rendering <ESP_024479_1755_COLOR_stretched_low compression.jp2>
Bounds: -4243933.318,-269578.645,-4242808.990,-268954.019, Dim: 2556x1420 (Layer Bounds: -4244595.679,-275828.375,-4242026.429,-263665.875)
Write access violation at data address 0x0000000000000000,
program address 0x000007FEFCD0B3DD.

Version: v17.0.2 (64-bit)
Build Time: Oct 19 2015 19:57:11

Stack Trace:
000007FED64BDE25 (MSVCR110)
0000000076D3D351 (ntdll)
00000001409E6C52 (global_mapper)
0000000140903057 (global_mapper)
000000014018BA83 (global_mapper)
00000001400FA599 (global_mapper)
00000001400EA52B (global_mapper)
000007FED6150ACA (mfc110)
000007FED6165736 (mfc110)
00000001400ECD8B (global_mapper)
000007FED6165148 (mfc110)
000007FED61629E6 (mfc110)
000007FED6162DA0 (mfc110)
000007FED601C9D1 (mfc110)
... (33 Additional Stack Items Hidden)

Windows 7 Professional (64-bit) Memory: 5,461,778,432 of 19,309,760,512 available, GDI Usage: 508 GDI (Peak 669), 120 User (Peak 260)

thanks for your help!


  • MykleMykle Global Mapper User Posts: 448Trusted User
    Can you update to the current version and see if the Global Mapper report is different? 
    (yours is a dozen versions old)

    That said, are the black areas part of the image, or is it the Global Mapper background that you are currently using?

    Are you loading a JP2000 image, or are you exporting to that format?  If you are loading a JP2000 image, is it's projection the same as your display and export projection?  I'm wondering if the import image is different, and you can change your display to match while you define your crop boundary, then switch your display projection back.  Sometimes this is a useful technique. 
  • danielekdanielek Global Mapper User Posts: 15
    Hi Mikle,

    Thanks for your answer. I don't think I can move from 17.0.2 to 17.2, I think we have a license for 17.0 only.
    the black parts are part of the image. For instance, they disappear when the jp2 format is transformed to png. The problem appears when I am loading a jpeg2000 file. But I do remember that several times I transformed a geotiff file to jpeg2000 and faced the same problem. It doe snot make a diffrence whetehr the Jpeg2000 format is interpreted as image or as elevation. The images are all in rectangular projection, which is the same as the projection I am using for the gmw file.
    And today I found the same problem with the ecw format!
  • MykleMykle Global Mapper User Posts: 448Trusted User
    Your license is for 17.x, so that will include 17.0, 17.1, 17.2. 

    You can define black to be transparent on the Raster Options dialog.  That may be useful only for testing if you also have black pixels within the image.   Not having played with JPEG2000, I may be missing something. 

    The rest of your problem may be better handled by addressing

  • danielekdanielek Global Mapper User Posts: 15

    Defining transparency as black in the Raster Options dialog removes all the black, including when the zoom level is such that the whole image is black. The only way to get rid of the black that surrounds the image is by defining a polygon. That way the whole problem disappears, whatever the zoom level.

    It could be related to the proportion of black (blank) data versus image data versus background data in a given zoom level. It is as if when there is too much black in the image rectangle (that is, the image orientation is too much oblique compared to north), GM (or my graphic card?? NVIDIA Quadro 600) decides that the whole image can be simplified as black. This could explain why it happens for some ecw images too, although less frequently.

Sign In or Register to comment.