I've been using @ImageOptions to scale (PNG) images. This mostly
worked in GWT 2.2 but now that I've moved to GWT 2.3 most images fail
quietly and don't display (meaning that src="#" instead of the inlined
image at runtime).
public interface MyResources
extends
ClientBundle
{
@Source("org/example/my-image-a.png")
@ImageOptions(width = 118, height = 156)
ImageResource myImageA();
:
@Source("org/example/my-image-b.png")
@ImageOptions(width = 130)
ImageResource myImageB();
}
There does not seem to be any rule (AFAICT) that determines which
images work and which don't. What always seems to work is
@ImageOptions (i.e. no scaling) and @ImageOptions(width = W, height =
H) (where H and W are the actual height and width of the image). Other
values might or might not work. (It's quite deterministic though, the
same number(s) for the same image either work or they don't, it
doesn't change from run to run).
I intend to scale the images myself to work around the problem but I
would like to understand what the root cause is and why there are no
error messages. Any ideas?
Cheers,
Hilco