I have been trying to get an ROI that I can use as a texture in opengl, I am able to get a full sized image, but when I try to get an ROI it ends up be distorted in some way. What is the proper size for making the ROI buffer and what pitch should I be be calculating.
Tim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having the same problem, so I don't think its been completely solved yet.
The problem only seems to occur on images larger than 4096x4096 pixels, and can be demonstrated using the pre-compiled pgfconsole tool.
eg: pgfconsole -d -rect 0 0 256 256 ROIimage.pgf out.png
If ROIimage.pgf was 4096x4096, then all works fine, but for most larger images, out.png will be covered in streaks and bright coloured patches.
However, if I skip the -rect parameter, and decode the entire image, then it also looks fine. My current workaround is to break large images up into an array of smaller files, which is not ideal. I tried debugging the source code, but no luck so far.
Rene
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have been trying to get an ROI that I can use as a texture in opengl, I am able to get a full sized image, but when I try to get an ROI it ends up be distorted in some way. What is the proper size for making the ROI buffer and what pitch should I be be calculating.
Tim
The problem has been solved.
Chris
I'm having the same problem, so I don't think its been completely solved yet.
The problem only seems to occur on images larger than 4096x4096 pixels, and can be demonstrated using the pre-compiled pgfconsole tool.
eg: pgfconsole -d -rect 0 0 256 256 ROIimage.pgf out.png
If ROIimage.pgf was 4096x4096, then all works fine, but for most larger images, out.png will be covered in streaks and bright coloured patches.
However, if I skip the -rect parameter, and decode the entire image, then it also looks fine. My current workaround is to break large images up into an array of smaller files, which is not ideal. I tried debugging the source code, but no luck so far.
Rene