membersound
membersound

Reputation: 86875

Scale image size of GWT ImageBundle?

How can I change the size of an image resource that is used in the following way:

 public static interface SelectionImages extends ImageBundle {
            @Resource("image.png")
            AbstractImagePrototype selectionAll();
    }

Upvotes: 1

Views: 1888

Answers (1)

appbootup
appbootup

Reputation: 9537

I am not sure whether you are trying to change size at runtime or compile time via GWT code.

1) You can set/change image's width/height properties as documented under -

http://code.google.com/p/google-web-toolkit/wiki/ImageResource
https://developers.google.com/web-toolkit/doc/latest/DevGuideUiImageBundles

2) Scaling Images - http://fvisticot.blogspot.in/2010/01/scalable-image-with-gwt20-and.html ( This is bit outdated but the principles used will be similar )

3) Also scaling is not same as image resize - https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/a88J6-sixW0

Upvotes: 1

Related Questions