-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The DPIUtil method for auto-scaling image data
private static ImageData autoScaleImageData (Device device, final ImageData imageData, float scaleFactor)performs the scaling via drawing the image using an anti-aliased GC into a new image when auto-scale mode SMOOTH is enabled.
The created image, into which the rescaled image is drawn, does not take the characteristics of the original image data into account (e.g., containing a transparency mask) but simply initializes the image with alpha data. One consequence is that rescaling images of type SWT.ICON, which use a transparency mask, lose their transparency mask and thus their image type when rescaling (eclipse-platform/eclipse.platform.swt#1790).
The autoScaleImageData method shall be improved to return image data with the same characteristics (in particular the type of transparency) used by the original data when the auto-scaling mode is SMOOTH.
One possibility might be to apply a similar solution as in eclipse-platform/eclipse.platform.swt#1790 but inside the auto-scaling implementation rather than in a consumer.
See also:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status