Loading JP2 and J2K images works!

By deebuv

I was finally able to find the error in my jpeg2000 plugin code. The reason for the error was that I was not reading the filename properly (basically reading NULL) and because of this I was getting segmentation faults when it tried to load images. I always assumed that the run function would automatically have the filename and never bothered to check this!  I solved the problem by providing the necessary arguments in the query function.

The good thing is that the load plugin is working smoothly on the select images that I tested it on. It may be a little slow but I can definitely speed it up using row processing. I used the openjpeg library although I could have used the jasper library as well because the problem I was getting was common. But the openjpeg library is specifically geared towards jpeg2000 development and the library functions are a lot more easier to use that the jasper library. The final code is also very clean.

A screenshot of how the image was loaded is shown below.

screenshot

I will be out attending a family function for the next two days and will start working on refining the current load code and then work on saving as jp2 or j2k images.

3 Responses to “Loading JP2 and J2K images works!”

  1. Chen Brestel Says:

    Hi,
    I need a plugin for GIMP for jp2 read (optionally also write).
    could you please send me?
    Thanks in advance,
    Chen

  2. pucelo Says:

    In this link you have a Windows compiled version:
    http://www.megaupload.com/?d=BANPHKD6

    This is the tread in a Spanish forum about the file:
    http://www.gimp.org.es/modules/newbb/viewtopic.php?topic_id=691&forum=2

  3. zorroh Says:

    Hi,

    is somewhere linux gimp plugin for jpeg2000?

Leave a Reply