From: Dave H. <da...@mi...> - 2000-03-22 18:10:03
|
I was just idly wondering about this bit of code:- if (errline != errlast) { errlast = errline; Image_get_col(image, in, errline); } (*colorfunc)(in, out, image_height, image_bpp, cmap, v); that appears in the various printer drivers. Do any of the various colorfunc routines have any random element in them? I looked quickly and couldn't find any. If this is the case, then surely it is more efficient to code this as:- if (errline != errlast) { errlast = errline; Image_get_col(image, in, errline); (*colorfunc)(in, out, image_height, image_bpp, cmap, v); } so that the colorfunc is only called once instead of repeatedly for the same input line. Might shave a bit off the processing time if the image is being expanded a lot. Dave -- Dave Hill, Kempston, Bedford UK da...@mi... davehill at users.sourceforge.net Sicth munce ago, I cutn't evun spel enjuneer, and now I are one! |