Skip to content

Commit

Permalink
Fix variable mis-switch so that images will be displayed correctly (e…
Browse files Browse the repository at this point in the history
…clipse-birt#1437) (eclipse-birt#1438)

* Fix variable mis-switch so that images will be displayed correctly
(eclipse-birt#1437)

* Removed blank line to get correct PR built

* The URL must be checked with lower-case string because the letters could
be have different kinds of writting
  • Loading branch information
speckyspooky authored Sep 28, 2023
1 parent 89c1d69 commit 7956cd9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
/**
* Manages all image resources.
*/

public class ImageManager {

private static final String EMBEDDED_SUFFIX = ".Embedded."; //$NON-NLS-1$
Expand Down Expand Up @@ -283,9 +282,9 @@ public Image getEmbeddedImageDataURL(String url, boolean refresh) throws IOExcep
Decoder decoder = java.util.Base64.getDecoder();

try {
if (url.toLowerCase().contains(URL_PROTOCOL_TYPE_DATA_BASE)) // $NON-NLS-1$
if (url.toLowerCase().contains(URL_IMAGE_TYPE_SVG)) // $NON-NLS-1$
{
in = convertSvgToRasterImage(url.toString());
in = convertSvgToRasterImage(new String(decoder.decode(imageDataBase64)));
} else {
in = new ByteArrayInputStream(decoder.decode(imageDataBase64));
}
Expand Down

0 comments on commit 7956cd9

Please sign in to comment.