Menu

#9 Image corruption when using ROI on large images.

v1.0 (example)
closed-fixed
None
5
2015-06-20
2015-05-06
No

When using ROI to extract part of a large image, the resulting image gets corrupted somehow. The image is still recognizable, but is covered with brightly coloured blotches, and random noise. 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. (I have one test image of 8192x8192 where ROI works correctly, but this is an exception.)

However, if I skip the -rect parameter, and decode the entire image, the output is fine. So the problem only happens when using ROI to extract sub regions.

I'm using libPGF v.6.14.12, compiled with GCC on Ubuntu 14.02, but the problem also occurs with the pre-compiled win32 pgfconsole app from the download area. The problem occurs with Gray16 and RGB Colour images, and probably also with other formats.
Please let me know if you would like me to provide test images to demonstrate the problem?

Discussion

  • Rene Lindsay

    Rene Lindsay - 2015-05-06

    The two attached images show what the corruption looks like.
    I took a 6000x6000 image, and cropped it to 4096x4096, and encoded both to PGF.
    I then extracted a 256x256 area from both, using pgfconsole.
    tile.png shows a corrupted image, extracted from the 6000x6000 image.
    tile2.png shows the same area, extracted from the 4096x4096 image.
    They should look identical, but clearly tile.png is corrupted.

     
  • Christoph Stamm

    Christoph Stamm - 2015-05-07

    Hi Rene

    Thank you for your detailled bug report. I will check the problem and try
    to fix it as soon as possible.

    Chris

    Quoting Rene Lindsay rjklindsay@users.sf.net:


    [BUGS:#9][1] IMAGE CORRUPTION WHEN USING ROI ON LARGE IMAGES.

    STATUS: unread
    GROUP: v1.0 (example)
    CREATED: Wed May 06, 2015 04:38 PM UTC by Rene Lindsay
    LAST UPDATED: Wed May 06, 2015 04:38 PM UTC
    OWNER: Christoph Stamm

    When using ROI to extract part of a large image, the resulting image
    gets corrupted somehow. The image is still recognizable, but is covered
    with brightly coloured blotches, and random noise. 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.
    (I have one test image of 8192x8192 where ROI works correctly, but this
    is an exception.)

    However, if I skip the -rect parameter, and decode the entire image,
    the output is fine. So the problem only happens when using ROI to
    extract sub regions.

    I'm using libPGF v.6.14.12, compiled with GCC on Ubuntu 14.02, but
    the problem also occurs with the pre-compiled win32 pgfconsole app from
    the download area. The problem occurs with Gray16 and RGB Colour images,
    and probably also with other formats.
    Please let me know if you would like me to provide test images to
    demonstrate the problem?


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/libpgf/bugs/9/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    [1] http://sourceforge.net/p/libpgf/bugs/9

     
  • Christoph Stamm

    Christoph Stamm - 2015-05-09

    Hi Rene

    Today I've tried to reproduce your error with a self created png rgb imge
    of size 6000x6000, but I couldn't reproduce it with the WIN32 console
    application. I've attached my test image. Please make the same tests with
    my test image on your platform and send me also your test image.

    Chris

    Zitat von Rene Lindsay rjklindsay@users.sf.net:


    [BUGS:#9][1] IMAGE CORRUPTION WHEN USING ROI ON LARGE IMAGES.

    STATUS: unread
    GROUP: v1.0 (example)
    CREATED: Wed May 06, 2015 04:38 PM UTC by Rene Lindsay
    LAST UPDATED: Wed May 06, 2015 04:38 PM UTC
    OWNER: Christoph Stamm

    When using ROI to extract part of a large image, the resulting image
    gets corrupted somehow. The image is still recognizable, but is covered
    with brightly coloured blotches, and random noise. 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.
    (I have one test image of 8192x8192 where ROI works correctly, but this
    is an exception.)

    However, if I skip the -rect parameter, and decode the entire image,
    the output is fine. So the problem only happens when using ROI to
    extract sub regions.

    I'm using libPGF v.6.14.12, compiled with GCC on Ubuntu 14.02, but
    the problem also occurs with the pre-compiled win32 pgfconsole app from
    the download area. The problem occurs with Gray16 and RGB Colour images,
    and probably also with other formats.
    Please let me know if you would like me to provide test images to
    demonstrate the problem?


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/libpgf/bugs/9/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    [1] http://sourceforge.net/p/libpgf/bugs/9

     
  • Christoph Stamm

    Christoph Stamm - 2015-05-20
    • status: unread --> open-works-for-me
     
  • Rene Lindsay

    Rene Lindsay - 2015-06-01

    Hi Chris,

    Thanks for your quick reply. Your test image works fine for me.
    How about I send you MY test image, which fails. (see attachment)
    The command I use is:
    pgfconsole -d -rect 0 0 256 256 texture6000.pgf out.png

    The resulting image is corrupted.
    However if I skip the -rect parameter, the whole image extracts correctly.

    Thanks,

    Rene

     
    • Christoph Stamm

      Christoph Stamm - 2015-06-02

      Hi Rene

      Thank you for your test image. I can reproduce your bug. The pgf image is
      valid, so the problem is in the ROI decoder. If I use your image data and
      produce a pgf image with 7 instead of 6 levels, then the degradiation is
      less, but it is still there.

      Chris

      Quoting Rene Lindsay rjklindsay@users.sf.net:

      Hi Chris,

      Thanks for your quick reply. Your test image works fine for me.
      How about I send you MY test image, which fails. (see attachment)
      The command I use is:
      pgfconsole -d -rect 0 0 256 256 texture6000.pgf out.png

      The resulting image is corrupted.
      However if I skip the -rect parameter, the whole image extracts
      correctly.

      Thanks,

      Rene

      Attachment: texture6000.pgf (21.3 MB; application/octet-stream)


      [BUGS:#9][1] IMAGE CORRUPTION WHEN USING ROI ON LARGE IMAGES.

      STATUS: open-works-for-me
      GROUP: v1.0 (example)
      CREATED: Wed May 06, 2015 04:38 PM UTC by Rene Lindsay
      LAST UPDATED: Wed May 20, 2015 04:20 PM UTC
      OWNER: Christoph Stamm

      When using ROI to extract part of a large image, the resulting image
      gets corrupted somehow. The image is still recognizable, but is covered
      with brightly coloured blotches, and random noise. 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.
      (I have one test image of 8192x8192 where ROI works correctly, but this
      is an exception.)

      However, if I skip the -rect parameter, and decode the entire image,
      the output is fine. So the problem only happens when using ROI to
      extract sub regions.

      I'm using libPGF v.6.14.12, compiled with GCC on Ubuntu 14.02, but
      the problem also occurs with the pre-compiled win32 pgfconsole app from
      the download area. The problem occurs with Gray16 and RGB Colour images,
      and probably also with other formats.
      Please let me know if you would like me to provide test images to
      demonstrate the problem?


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/libpgf/bugs/9/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      [1] http://sourceforge.net/p/libpgf/bugs/9

       
  • Christoph Stamm

    Christoph Stamm - 2015-06-20
    • status: accepted --> closed-fixed in Version 7.15.25
     

    Last edit: Christoph Stamm 2015-06-20

Log in to post a comment.

MongoDB Logo MongoDB