+ /**
+ * Parse the raster attributes.
+ */
+ private void parseRaster() {
+ int pan = getParam(0, 0); // Aspect ratio numerator
+ int pad = getParam(1, 0); // Aspect ratio denominator
+ int pah = getParam(2, 0); // Horizontal width
+ int pav = getParam(3, 0); // Vertical height
+
+ if ((pan == pad) && (pah > 0) && (pav > 0)) {
+ rasterWidth = pah;
+ rasterHeight = pav;
+ if ((rasterWidth <= MAX_WIDTH) && (rasterHeight <= MAX_HEIGHT)) {
+ resizeImage(rasterWidth, rasterHeight);
+ } else {
+ abort = true;
+ }
+ } else {
+ abort = true;
+ }
+ }
+