From 623817ab6409324efa80510e5e9f155eb3eb7fa6 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 24 Jul 2020 09:59:47 -0700 Subject: [PATCH 1/2] 4x4.png -> 2x2.png; this file is actually 2x2 --- testing/dart/encoding_test.dart | 2 +- testing/dart/image_descriptor_test.dart | 2 +- testing/dart/image_resize_test.dart | 14 +++++++------- testing/resources/4x4.png | Bin 71 -> 0 bytes 4 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 testing/resources/4x4.png diff --git a/testing/dart/encoding_test.dart b/testing/dart/encoding_test.dart index d318163ec5695..c33b7cecb217a 100644 --- a/testing/dart/encoding_test.dart +++ b/testing/dart/encoding_test.dart @@ -114,7 +114,7 @@ class GrayscaleImage { GrayscaleImage._(); static Future load() async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Completer completer = Completer(); decodeImageFromList(bytes, (Image image) => completer.complete(image)); return await completer.future; diff --git a/testing/dart/image_descriptor_test.dart b/testing/dart/image_descriptor_test.dart index e888ee26ee46a..67ad8b28e9d9f 100644 --- a/testing/dart/image_descriptor_test.dart +++ b/testing/dart/image_descriptor_test.dart @@ -13,7 +13,7 @@ import 'package:test/test.dart'; void main() { test('basic image descriptor - encoded - greyscale', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final ImmutableBuffer buffer = await ImmutableBuffer.fromUint8List(bytes); final ImageDescriptor descriptor = await ImageDescriptor.encoded(buffer); diff --git a/testing/dart/image_resize_test.dart b/testing/dart/image_resize_test.dart index c631a6c15c485..f864ea03305ad 100644 --- a/testing/dart/image_resize_test.dart +++ b/testing/dart/image_resize_test.dart @@ -19,7 +19,7 @@ void main() { }()); test('no resize by default', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes); final FrameInfo frame = await codec.getNextFrame(); final int codecHeight = frame.image.height; @@ -29,7 +29,7 @@ void main() { }); test('resize width with constrained height', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes, targetHeight: 1); final FrameInfo frame = await codec.getNextFrame(); final int codecHeight = frame.image.height; @@ -39,7 +39,7 @@ void main() { }); test('resize height with constrained width', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes, targetWidth: 1); final FrameInfo frame = await codec.getNextFrame(); final int codecHeight = frame.image.height; @@ -49,7 +49,7 @@ void main() { }); test('upscale image by 5x', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes, targetWidth: 10, allowUpscaling: true); final FrameInfo frame = await codec.getNextFrame(); final int codecHeight = frame.image.height; @@ -59,7 +59,7 @@ void main() { }); test('upscale image by 5x - no upscaling', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes, targetWidth: 10, allowUpscaling: false); final FrameInfo frame = await codec.getNextFrame(); final int codecHeight = frame.image.height; @@ -69,7 +69,7 @@ void main() { }); test('upscale image varying width and height', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes, targetWidth: 10, targetHeight: 1, allowUpscaling: true); final FrameInfo frame = await codec.getNextFrame(); @@ -80,7 +80,7 @@ void main() { }); test('upscale image varying width and height - no upscaling', () async { - final Uint8List bytes = await readFile('4x4.png'); + final Uint8List bytes = await readFile('2x2.png'); final Codec codec = await instantiateImageCodec(bytes, targetWidth: 10, targetHeight: 1, allowUpscaling: false); final FrameInfo frame = await codec.getNextFrame(); diff --git a/testing/resources/4x4.png b/testing/resources/4x4.png deleted file mode 100644 index 21b295abc16c89cdc87d86c10625d94352bab3f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 71 zcmeAS@N?(olHy`uVBq!ia0vp^Od!kwBpAZ)2K@k1e4Z|jAsp9}|D8V&aGrsIO^~r^ S!p<+gAQhgjelF{r5}E)44-uRI From c151d4105d1e85fca08ef3879e3e52c9a4f9744c Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 24 Jul 2020 10:06:02 -0700 Subject: [PATCH 2/2] add file --- testing/resources/2x2.png | Bin 0 -> 71 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testing/resources/2x2.png diff --git a/testing/resources/2x2.png b/testing/resources/2x2.png new file mode 100644 index 0000000000000000000000000000000000000000..21b295abc16c89cdc87d86c10625d94352bab3f2 GIT binary patch literal 71 zcmeAS@N?(olHy`uVBq!ia0vp^Od!kwBpAZ)2K@k1e4Z|jAsp9}|D8V&aGrsIO^~r^ S!p<+gAQhgjelF{r5}E)44-uRI literal 0 HcmV?d00001