Loading JP2 and J2K images works!

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.

Advertisements

One Response to “Loading JP2 and J2K images works!”

  1. zorroh Says:

    Hi,

    is somewhere linux gimp plugin for jpeg2000?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: