Skip to content
Snippets Groups Projects
Commit 42f02103 authored by Per Hedbor's avatar Per Hedbor
Browse files

Optimizations

Rev: lib/modules/_Image_XPM.pmod:1.6
parent cf2cdf98
No related branches found
No related tags found
No related merge requests found
......@@ -64,10 +64,12 @@ mapping _decode( string what, void|mapping opts )
retopts->hot_y = values[5];
}
TD("Colors");
mixed colors = ([]);
if(sizeof(data) < ncolors+2)
error("Too few elements in array to decode color values\n");
array colors;
if(cpp < 4)
colors = data[1..ncolors];
else
colors = sort(data[1..ncolors]);
TD("Creating images");
object i = Image.image( width, height );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment