mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Fix problem with jpg icons
This commit is contained in:
parent
6ebee71b81
commit
453c445b45
|
@ -218,8 +218,9 @@ fun checkIcon(icon: File, withIconDownload: Boolean, allIconCIDs: MutableSet<Str
|
||||||
val imageReader = ImageIO.getImageReaders(imageInputStream).next()
|
val imageReader = ImageIO.getImageReaders(imageInputStream).next()
|
||||||
val image = ImageIO.read(imageInputStream)
|
val image = ImageIO.read(imageInputStream)
|
||||||
|
|
||||||
if (imageReader.formatName != format) {
|
val formatOfIconDownload = imageReader.formatName.replace("JPEG", "jpg")
|
||||||
error("format in json ($icon) is $format but actually is in imageDownload ${imageReader.formatName}")
|
if (formatOfIconDownload != format) {
|
||||||
|
error("format in json ($icon) is $format but actually is in imageDownload $formatOfIconDownload")
|
||||||
}
|
}
|
||||||
if (image.width != width) {
|
if (image.width != width) {
|
||||||
error("width in json ($icon) is $width but actually is in imageDownload ${image.width}")
|
error("width in json ($icon) is $width but actually is in imageDownload ${image.width}")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user