scaleImage32 is throwing error out of memory when crossing bounds to 1800,1800 in blackberry -
encodedimage.scaleimage32 throwing error out of memory when crossing bounds 1800,1800. there work around same.
public encodedimage sizeimage(encodedimage image, int width, int height) { encodedimage result = null; int currentwidthfixed32 = fixed32.tofp(image.getwidth()); int currentheightfixed32 = fixed32.tofp(image.getheight()); int requiredwidthfixed32 = fixed32.tofp(width); int requiredheightfixed32 = fixed32.tofp(height); int scalexfixed32 = fixed32.div(currentwidthfixed32, requiredwidthfixed32); int scaleyfixed32 = fixed32.div(currentheightfixed32, requiredheightfixed32); result = image.scaleimage32(scalexfixed32, scaleyfixed32); return result; }
Comments
Post a Comment