if((ic->display_type==IL_Printer) && (ic->dest_width != ic->image->header.width) && (ic->dest_height != ic->image->header.height )) return FALSE;
il_image_match(il_container *ic,          /* Candidate for match. */               IL_DisplayType display_type,               const char *image_url,               IL_IRGB *background_color,               int req_depth,             /* Colorspace depth. */               int req_width,             /* Target image width. */               int req_height)            /* Target image height. */{    PRBool ic_sized = (ic->state >= IC_SIZED);    NI_PixmapHeader *img_header = &ic->image->header;    IL_IRGB *img_trans_pixel = img_header->transparent_pixel;    /* Allowable conditions for there to be a size match.  req_width and       req_height both zero indicate usage of the image's natural size.       If only one is zero, it indicates scaling maintaining the image's       aspect ratio.  If ic_size has been called for the image cache entry,       then ic->dest_width and ic->dest_height represent the size of the       image as it will be displayed.  If ic_size has not been called for       the cache entry, then ic->dest_width and ic->dest_height represent the       requested size. */    if (!(        /* Both dimensions match (either zero is a match.) */        ((req_width == ic->dest_width) && (req_height == ic->dest_height)) ||        /* Width matches, request height zero, aspect ratio same. */        (ic_sized && (req_width == ic->dest_width) && !req_height &&         !ic->aspect_distorted) ||        /* Height matches, request width zero, aspect ratio same. */        (ic_sized && (req_height == ic->dest_height) && !req_width &&         !ic->aspect_distorted) ||        /* Request dimensions zero, cache entry has natural dimensions. */        (!req_width && !req_height && ic->natural_size)        ))        return FALSE;	/* We allow any depth image through as the FE may have asked us to	   decode to a colorspace other than the display colorspace. */	/* Now check the background color.  This only applies to transparent       images, so skip this test if the candidate for the match is known       to be opaque. */    if (!ic_sized || img_trans_pixel) {        if (background_color) {            if (ic->background_color) {                /* Both request and candidate have a background color; check                   whether they match. */                if (background_color->red != ic->background_color->red)                    return FALSE;                if (background_color->green != ic->background_color->green)                    return FALSE;                if (background_color->blue != ic->background_color->blue)                    return FALSE;            }            else {                /* A background color was requested, but the candidate does                   not have one. */                return FALSE;            }        }        else {                      /* No background color was requested. */            if (ic->background_color) {                /* A background color was not requested, but the candidate                   has one.  This means that while the current request may                   need a mask, the candidate definitely does not have one. */                return FALSE;            }            else {                /* Neither the request nor the candidate have a background                   color, so don't disqualify the candidate. */            }        }    }    /* Check the url (we have already checked the hash value which is based       on the url.) */    if (strcmp(image_url, ic->url_address))        return FALSE;    /* Printer contexts and window contexts may have different       native image formats, so don't reuse an image cache entry       created for an onscreen context in a printer context or       vice-versa. */    if (display_type != ic->display_type)        return FALSE;    /* XXX - temporary */    if (ic->rendered_with_custom_palette)        return FALSE;                    return TRUE;}