Image wrongly scaled and getting larger on weight instead of lower when extension is .png
Malu via opencms-dev <[email protected]>
| Newsgroups | gmane.comp.cms.opencms.devel |
|---|---|
| Message-ID | <CAPmBPoCe9hzVRtV_WCf1U+080wT4egyCZB6nrzOk3Wr8F1-mjw@mail.gmail.com> |
Hi We have discovered and issue with the image scaler which we don’t know if it is a bug or else. He have an image (.png) of weight 529kb and a width of 1920px, which we scale with the interface *CmsImageScaler* like this: *CmsImageScaler scaler = new CmsImageScaler();* *scaler.setWidth(Integer.parseInt(width)); // <-----width is set to 1110px* *atributoSRC = cms.link(thumbnail + "?__scale=" + scaler.toString());* What we get in result is a copy correctly scaled to width passed (1110px) but its weight is tripled to 1.67Mb and we suppose it should be lower weight than the original since it has less in number of pixels as width. We have discovered that this issue doesn’t occur when image is extension .jpg, which correctly produces a much lower weight image. In fact if we change the original image extension from .png to .jpg it produces an image of 314Kb. Do you think this might be a bug? Thank you, kind regards Maria _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit https://lists.opencms.org/mailman/listinfo/opencms-dev