* Use signed arithmetic when reading rectangle
An operation such as DirectBitsRect can fail if the origin is -ve and we're applying a screen image ratio. See for example P564B1400.pict
* Fix copy/paste error in testNegativeOrigin()
---------
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
Ensure the x,y offset for extended v2 pictures is respected by updating 'frame' to the correct bounding rectangle. As a result we
need to base output image directly on frame size rather than applying screen image ratio. See cow.pict.
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
x2 and y2 were swapped over, resulting in an "invalid bounds" exception with -ve height on some nonV2Ext images,
see for example CatDV==2.0=1=.pict or Picture14.pict
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Third attempt
* Add test file
* Only suppress lastQTRect if PackBitsRect immediately follows CompressedQuickTime opcode
* Only suppress lastQTRect if PackBitsRect immediately follows CompressedQuickTime opcode
* Add unit test that checks pixel values
* Add missing ImageIO import
* Fix formatting issues
---------
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
Include hex opcode and file offset in debug output. Condense scan line messages in readOpDirectBits().
---------
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* chore: Update to junit5 for servlet package
* chore: Update to junit5 for contrib package
* chore: Update to junit5 for common-image package
* chore: Update to junit5 for common-lang package
* chore: Update to junit5 for entire project files
* fix: test case for JPEGImageReaderTest failed for java 8 and 11
assertEquals was using old signature of junit4.
* Update common/common-io/src/test/java/com/twelvemonkeys/io/InputStreamAbstractTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update common/common-io/src/test/java/com/twelvemonkeys/io/InputStreamAbstractTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-bmp/src/test/java/com/twelvemonkeys/imageio/plugins/bmp/BMPImageReaderTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-jpeg/src/test/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGImageReaderTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageMetadataTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageReaderTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageWriterTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/stream/BufferedChannelImageInputStreamTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/stream/BufferedChannelImageInputStreamTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* refactor: few indentation changes and missed test case
- review change related to missing test annotation
- unwanted new lines inside test case
- duplicate assertions
* refactor: moved the lambda expression to method reference
* review: testNotNullWithParameterNull catch block was never executed.
Added the suggested change
* Apply suggestions from code review
chore: adjust suggested indentation
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageReaderAbstractTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageReaderAbstractTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageWriterAbstractTest.java
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
* refactor: using assertTimeout doesnot kill the execution, even if the timeout happens.
It is better to use assertTimeoutPreemptively in cases, where we really want to kill the execution after timeout.
https://stackoverflow.com/questions/57116801/how-to-fail-a-test-after-a-timeout-is-exceeded-in-junit-5/57116959#57116959
---------
Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>