Closed Prajun2010 closed 4 months ago
Describe the bug File extensions with uppercase, eg."image.PNG", are not supported by addFileExtension() method of BitmapEncoder class.
To Reproduce
public class BitmapEncoderTest { @Test public void testAddFileExtension() { String fileName1 = "image"; String fileName2 = "image.png"; String fileName3 = "image.PNG"; Assert.assertEquals(BitmapEncoder.addFileExtension(fileName1, BitmapEncoder.BitmapFormat.PNG), "image.png"); Assert.assertEquals(BitmapEncoder.addFileExtension(fileName2, BitmapEncoder.BitmapFormat.PNG), "image.png"); Assert.assertEquals(BitmapEncoder.addFileExtension(fileName3, BitmapEncoder.BitmapFormat.PNG), "image.png"); } }
Screenshots
Expected behavior The method should accept both lowercase and uppercase formats of a file extension. Eg: "PNG" == "png"
Thanks for the report and the test case. It has definitely helped.
Describe the bug File extensions with uppercase, eg."image.PNG", are not supported by addFileExtension() method of BitmapEncoder class.
To Reproduce
Screenshots
Expected behavior The method should accept both lowercase and uppercase formats of a file extension. Eg: "PNG" == "png"