I'm having trouble getting PNG images to size correctly on load. The images are maps dynamically generated on one of our servers. To simplify the problem, I've simulated the servlet call and eliminated browser caching from the problem by adding a date parameter on the image URL. The image renders in the browser at 25x100, where as its natural size is 350x208.
How do I get the image to display at its natural size?
Sample code is below. I'm running SmartClient Version: v8.2p_2012-04-10/Enterprise Deployment (built 2012-04-10) on Firefox 11.0, Mac OSX 10.6.8.
Thanks,
Chris
How do I get the image to display at its natural size?
Sample code is below. I'm running SmartClient Version: v8.2p_2012-04-10/Enterprise Deployment (built 2012-04-10) on Firefox 11.0, Mac OSX 10.6.8.
Thanks,
Chris
Code:
VLayout example = new VLayout(); example = new VLayout(); example.setOverflow(Overflow.VISIBLE); example.setPadding(5); example.setMembersMargin(5); example.setHeight(1); example.setWidth(1); final Img image = new Img( "http://www.w3.org/Graphics/PNG/nurbcup2si.png?date=" + System.currentTimeMillis()); image.setImageType(ImageStyle.NORMAL); example.addMember(image); example.draw();
Comment