Skip to content

Commit

Permalink
4x4.png -> 2x2.png; this file is actually 2x2 (flutter#20005)
Browse files Browse the repository at this point in the history
* 4x4.png -> 2x2.png; this file is actually 2x2
  • Loading branch information
dnfield authored Jul 29, 2020
1 parent a10774e commit b3ca41a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion testing/dart/encoding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class GrayscaleImage {
GrayscaleImage._();

static Future<Image> load() async {
final Uint8List bytes = await readFile('4x4.png');
final Uint8List bytes = await readFile('2x2.png');
final Completer<Image> completer = Completer<Image>();
decodeImageFromList(bytes, (Image image) => completer.complete(image));
return await completer.future;
Expand Down
2 changes: 1 addition & 1 deletion testing/dart/image_descriptor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
14 changes: 7 additions & 7 deletions testing/dart/image_resize_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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();
Expand All @@ -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();
Expand Down
File renamed without changes

0 comments on commit b3ca41a

Please sign in to comment.