Home | History | Annotate | Download | only in libtests

Lines Matching refs:Transform

236  * sRGB transform, given an 8-bit value which might be either sRGB or power-law.
2046 void (*transform)(Pixel *out, const Pixel *in, const Background *back);
2047 /* A function to perform the required transform */
2060 Transform;
2062 /* Return a 'transform' as above for the given format conversion. */
2064 transform_from_formats(Transform *result, Image *in_image,
2104 fprintf(stderr, "internal transform via linear error 0x%x->0x%x\n",
2109 result->transform = gpc_fn[in_base][out_base | PNG_FORMAT_FLAG_LINEAR];
2120 result->transform = gpc_fn[in_base][out_base];
2128 * transform function just gets a pixel value, however because libpng
2134 result->transform = gpc_fn_colormapped[in_base][out_base];
2136 result->transform = gpc_fn[in_base][out_base];
2246 /* Copy the error values into the Transform: */
2347 logpixel(const Transform *transform, png_uint_32 x, png_uint_32 y,
2350 const png_uint_32 in_format = transform->in_image->image.format;
2351 const png_uint_32 out_format = transform->out_image->image.format;
2363 if (transform->is_palette)
2368 if (transform->from_linear != NULL)
2378 if (transform->background != NULL)
2383 back.r = transform->background->ir;
2384 back.g = transform->background->ig;
2385 back.b = transform->background->ib;
2395 if (transform->in_image->file_name != transform->out_image->file_name)
2402 return logerror(transform->in_image, transform->in_image->file_name,
2403 error_buffer, transform->out_image->file_name);
2414 return logerror(transform->in_image, transform->in_image->file_name,
2420 cmppixel(Transform *transform, png_const_voidp in, png_const_voidp out,
2427 transform->in_gp(&pixel_in, in);
2429 if (transform->from_linear == NULL)
2430 transform->transform(&pixel_calc, &pixel_in, transform->background);
2434 transform->transform(&pixel_out, &pixel_in, transform->background);
2435 transform->from_linear(&pixel_calc, &pixel_out, NULL);
2438 transform->out_gp(&pixel_out, out);
2449 if (transform->output_8bit && pixel_calc.a == 0 && pixel_out.a == 0)
2459 if (err_a > transform->error[3])
2462 if (transform->accumulate)
2463 transform->error[3] = (png_uint_16)err_a;
2473 if (errmsg == NULL && transform->output_8bit &&
2488 if (pixel_in.a >= transform->in_opaque)
2510 if (maxerr <= transform->error[limit])
2516 if (transform->accumulate)
2518 transform->error[limit] = (png_uint_16)maxerr;
2524 return logpixel(transform, x, y, &pixel_in, &pixel_calc, &pixel_out, errmsg);
2616 Transform tr;
2623 /* Set up the background and the transform */
2730 /* If reqested copy the error values back from the Transform. */
2771 * or transform support (i.e. a memory compare) if:
2813 * bchannels. achannels may be different for a gray to rgb transform
2925 /* If reqested copy the error values back from the Transform. */