Skip to content
  • DRC's avatar
    djpeg -crop: Exit gracefully with non-PPM formats · 073b0e88
    DRC authored
    ... and document that only PPM/PGM output images are supported with the
    -crop option for the moment.
    
    I investigated the possibility of supporting -crop with -bmp, but even
    after resetting the buffer dimensions, I still kept getting virtual
    array access errors.  It seems that doing this the "right way" would
    require creating a re-initialization function for each image format's
    destination manager.  I'm disinclined to do that right now, given that
    this feature was Google's baby (developed as a prerequisite for
    including libjpeg-turbo in Android), and the -crop option in djpeg is
    intended only as an example of how to use the partial image
    decompression API.  Real-world applications would need to handle this
    in their own destination managers.
    
    It would probably be possible to make this work with Targa by employing
    a similar hack to the one we used with PPM, but Targa isn't popular
    enough to bother.
    
    Fixes #185
    073b0e88
To find the state of this project's repository at the time of any of these versions, check out the tags.