mraible opened a new pull request, #315:
URL: https://github.com/apache/roller/pull/315

   Thumbnail creation in `JPAMediaFileManagerImpl` now reads an image's width 
and height from its header with an `ImageReader` before decoding it.
   
   - Images with more pixels than the new `uploads.thumbnail.maxPixels` setting 
(default 50,000,000) are stored without a thumbnail, and the skip is logged. 
The upload itself still succeeds.
   - Other images are decoded with subsampling sized to the thumbnail, so a 
large photo no longer has to be decoded at full size first.
   - The content stream is closed, and content no image reader recognizes gets 
no thumbnail, whatever content type the client sent.
   
   Tests: `MediaFileThumbnailTest` (DB-backed) covers an image over a 
configured limit (no thumbnail; fails without the change), a normal image 
(thumbnail and size recorded) and a PNG whose header claims 50000x50000. 
`MediaFileTest` still passes, and `mvn test` passes (752 tests).
   
   CHANGES entries for this and the related fixes will come in one PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to