transform.h File Reference

#include "asvisual.h"
#include "blender.h"
#include "asimage.h"

Go to the source code of this file.

Functions

ASImagescale_asimage (struct ASVisual *asv, ASImage *src, int to_width, int to_height, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagescale_asimage2 (ASVisual *asv, ASImage *src, int clip_x, int clip_y, int clip_width, int clip_height, int to_width, int to_height, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagetile_asimage (struct ASVisual *asv, ASImage *src, int offset_x, int offset_y, int to_width, int to_height, ARGB32 tint, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagemerge_layers (struct ASVisual *asv, ASImageLayer *layers, int count, int dst_width, int dst_height, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagemake_gradient (struct ASVisual *asv, struct ASGradient *grad, int width, int height, ASFlagType filter, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImageflip_asimage (struct ASVisual *asv, ASImage *src, int offset_x, int offset_y, int to_width, int to_height, int flip, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagemirror_asimage (ASVisual *asv, ASImage *src, int offset_x, int offset_y, int to_width, int to_height, Bool vertical, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagepad_asimage (ASVisual *asv, ASImage *src, int dst_x, int dst_y, int to_width, int to_height, ARGB32 color, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImageblur_asimage_gauss (ASVisual *asv, ASImage *src, double horz, double vert, ASFlagType filter, ASAltImFormats out_format, unsigned int compression_out, int quality)
Bool fill_asimage (ASVisual *asv, ASImage *im, int x, int y, int width, int height, ARGB32 color)
ASImageadjust_asimage_hsv (ASVisual *asv, ASImage *src, int offset_x, int offset_y, int to_width, int to_height, int affected_hue, int affected_radius, int hue_offset, int saturation_offset, int value_offset, ASAltImFormats out_format, unsigned int compression_out, int quality)
Bool colorize_asimage_vector (ASVisual *asv, ASImage *im, ASVectorPalette *palette, ASAltImFormats out_format, int quality)
ASImagecreate_asimage_from_vector (ASVisual *asv, double *vector, int width, int height, ASVectorPalette *palette, ASAltImFormats out_format, unsigned int compression, int quality)
ASImageslice_asimage2 (ASVisual *asv, ASImage *src, int slice_x_start, int slice_x_end, int slice_y_start, int slice_y_end, int to_width, int to_height, Bool scaled, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImageslice_asimage (ASVisual *asv, ASImage *src, int slice_x_start, int slice_x_end, int slice_y_start, int slice_y_end, int to_width, int to_height, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagepixelize_asimage (ASVisual *asv, ASImage *src, int clip_x, int clip_y, int clip_width, int clip_height, int pixel_width, int pixel_height, ASAltImFormats out_format, unsigned int compression_out, int quality)
ASImagecolor2alpha_asimage (ASVisual *asv, ASImage *src, int clip_x, int clip_y, int clip_width, int clip_height, ARGB32 color, ASAltImFormats out_format, unsigned int compression_out, int quality)


Function Documentation

ASImage* adjust_asimage_hsv ( ASVisual asv,
ASImage src,
int  offset_x,
int  offset_y,
int  to_width,
int  to_height,
int  affected_hue,
int  affected_radius,
int  hue_offset,
int  saturation_offset,
int  value_offset,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 2793 of file transform.c.

References __transform_fake_asv, b, ASScanline::blue, ASImageDecoder::buffer, create_destination_image(), ASImageDecoder::decode_image_scanline, degrees2hue16(), destroy_asimage(), False, fprintf(), g, ASScanline::green, h, hsv2rgb(), int, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, MAX_HUE16, MIN_HUE16, normalize_degrees_val(), NULL, ASImageOutput::output_image_scanline, ASScanline::red, rgb2hue(), rgb2saturation(), rgb2value(), s, SCL_DO_ALL, set_decoder_shift(), SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), ASImageOutput::tiling_step, and ASScanline::width.

Referenced by TASImage::HSV().

ASImage* blur_asimage_gauss ( ASVisual asv,
ASImage src,
double  horz,
double  vert,
ASFlagType  filter,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 2336 of file transform.c.

References __transform_fake_asv, ASVisual::BGR_mode, ASImageDecoder::buffer, calc_gauss_int(), ASScanline::channels, copy_component(), create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), g, GAUSS_COEFF_TYPE, gauss_var_t, get_flags, gettimeofday(), height, int, load_gauss_scanline(), NULL, ASImageOutput::output_image_scanline, prepare_scanline(), PRINT_BACKGROUND_OP_TIME, result(), safecalloc, SCL_DO_ALL, start_image_decoding(), start_image_output(), stop_image_output(), width, and x01.

Referenced by TASImage::Blur().

ASImage* color2alpha_asimage ( ASVisual asv,
ASImage src,
int  clip_x,
int  clip_y,
int  clip_width,
int  clip_height,
ARGB32  color,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 3335 of file transform.c.

References __transform_fake_asv, a, ASScanline::alpha, APPLY_ALPHA_TO_CHAN, ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, AS_MAX_CHAN_VAL, AS_MIN_CHAN_VAL, b, ASScanline::blue, ASImageDecoder::buffer, c, create_destination_image(), ASImageDecoder::decode_image_scanline, define(), destroy_asimage(), fprintf(), g, ASScanline::green, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, MAKE_CHAN_ALPHA_FROM_COL, max, min, NULL, ASImageOutput::output_image_scanline, ASScanline::red, SCL_DO_ALL, start_image_decoding(), start_image_output(), START_TIME, stop_image_output(), and ASScanline::width.

Referenced by handle_asxml_tag_color2alpha().

Bool colorize_asimage_vector ( ASVisual asv,
ASImage im,
ASVectorPalette palette,
ASAltImFormats  out_format,
int  quality 
)

Definition at line 1919 of file transform.c.

References __transform_fake_asv, ASImage::alt, ASA_Vector, ASIM_VECTOR_TOP2BOTTOM, ASVisual::BGR_mode, buf, False, ASImage::flags, get_flags, IC_NUM_CHANNELS, NULL, palette, points, prepare_scanline(), QUANT_ERR_BITS, safemalloc, set_flags, start_image_output(), START_TIME, toggle_image_output_direction(), ASImage::ASImageAlternative::vector, ASImage::width, x, and x01.

Referenced by create_asimage_from_vector(), and TASImage::SetPalette().

ASImage* create_asimage_from_vector ( ASVisual asv,
double vector,
int  width,
int  height,
ASVectorPalette palette,
ASAltImFormats  out_format,
unsigned int  compression,
int  quality 
)

Definition at line 2035 of file transform.c.

References __transform_fake_asv, ARGB32_DEFAULT_BACK_COLOR, colorize_asimage_vector(), create_destination_image(), NULL, palette, and set_asimage_vector().

Referenced by TASImage::SetImage().

Bool fill_asimage ( ASVisual asv,
ASImage im,
int  x,
int  y,
int  width,
int  height,
ARGB32  color 
)

Definition at line 1849 of file transform.c.

References __transform_fake_asv, a, ASScanline::alpha, ARGB32_ALPHA8, ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, ASA_ASImage, ASIMAGE_QUALITY_DEFAULT, b, blue, ASScanline::blue, ASImageDecoder::buffer, ASImageDecoder::decode_image_scanline, False, g, green, ASScanline::green, ASImage::height, int, k, ASImageOutput::next_line, NULL, ASImageOutput::output_image_scanline, ASScanline::red, red, result(), SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), True, and ASImage::width.

Referenced by TASImage::Bevel(), TASImage::Blur(), TASImage::DrawText(), TASImage::FillRectangleInternal(), handle_asxml_tag_text(), TASImage::HSV(), TASImage::Pad(), and TASImage::Vectorize().

ASImage* flip_asimage ( struct ASVisual asv,
ASImage src,
int  offset_x,
int  offset_y,
int  to_width,
int  to_height,
int  flip,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 1545 of file transform.c.

References __transform_fake_asv, a, ASScanline::alpha, ARGB32_ALPHA8, ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, b, ASVisual::BGR_mode, ASScanline::blue, ASImageDecoder::buffer, create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), FLIP_UPSIDEDOWN, FLIP_VERTICAL, free(), free_scanline(), g, get_asimage_chanmask(), get_flags, ASScanline::green, int, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, MAKE_ARGB32, NULL, ASImageOutput::output_image_scanline, prepare_scanline(), ASScanline::red, result(), reverse_component(), safemalloc, SCANLINE_FUNC_FILTERED, SCL_DO_ALL, SHOW_TIME, size_t, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), toggle_image_output_direction(), True, and x.

Referenced by TASImage::Flip(), and handle_asxml_tag_rotate().

ASImage* make_gradient ( struct ASVisual asv,
struct ASGradient grad,
int  width,
int  height,
ASFlagType  filter,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 1468 of file transform.c.

References __transform_fake_asv, ASVisual::BGR_mode, create_destination_image(), destroy_asimage(), free(), free_scanline(), get_best_grad_back_color(), get_flags, GRADIENT_BottomLeft2TopRight, GRADIENT_Left2Right, GRADIENT_Top2Bottom, GRADIENT_TopLeft2BottomRight, GRADIENT_TYPE_DIAG, GRADIENT_TYPE_MASK, GRADIENT_TYPE_ORIENTATION, ASImage::height, line, LOCAL_DEBUG_CALLER_OUT, make_gradient_diag_height(), make_gradient_diag_width(), make_gradient_left2right(), make_gradient_scanline(), make_gradient_top2bottom(), MAX, MAX_GRADIENT_DITHER_LINES, MIN, NULL, prepare_scanline(), ASImageOutput::quality, QUANT_ERR_BITS, safecalloc, start_image_output(), START_TIME, stop_image_output(), True, ASGradient::type, and ASImage::width.

Referenced by TASImage::Gradient(), handle_asxml_tag_gradient(), TASPaletteEditor::PaintPalette::Paint(), and TASImage::Paint().

ASImage* merge_layers ( struct ASVisual asv,
ASImageLayer layers,
int  count,
int  dst_width,
int  dst_height,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 1097 of file transform.c.

References __transform_fake_asv, ARGB32_DEFAULT_BACK_COLOR, ASImageLayer::bevel, ASImageLayer::bevel_height, ASImageLayer::bevel_width, ASImageLayer::bevel_x, ASImageLayer::bevel_y, ASVisual::BGR_mode, ASImageLayer::clip_height, ASImageLayer::clip_width, ASImageLayer::clip_x, ASImageLayer::clip_y, create_destination_image(), ASImageLayer::dst_x, ASScanline::flags, ASImageLayer::im, LOCAL_DEBUG_CALLER_OUT, ASImageLayer::next, NULL, prepare_scanline(), QUANT_ERR_BITS, safecalloc, SCL_DO_ALL, set_decoder_back_color(), set_decoder_bevel_geom(), set_decoder_shift(), ASImageLayer::solid_color, start_image_decoding(), START_TIME, and ASImageLayer::tint.

Referenced by TASImage::Bevel(), TASImage::CreateThumbnail(), TASImage::DrawText(), fill_with_pixmapped_background(), TASImage::Gradient(), handle_asxml_tag_bevel(), handle_asxml_tag_text(), and TASImage::Merge().

ASImage* mirror_asimage ( ASVisual asv,
ASImage src,
int  offset_x,
int  offset_y,
int  to_width,
int  to_height,
Bool  vertical,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 1661 of file transform.c.

References __transform_fake_asv, ASVisual::BGR_mode, create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), free_scanline(), int, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, NULL, ASImageOutput::output_image_scanline, prepare_scanline(), result(), reverse_component(), SCANLINE_FUNC, SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), toggle_image_output_direction(), and True.

Referenced by handle_asxml_tag_mirror(), and TASImage::Mirror().

ASImage* pad_asimage ( ASVisual asv,
ASImage src,
int  dst_x,
int  dst_y,
int  to_width,
int  to_height,
ARGB32  color,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 1721 of file transform.c.

References __transform_fake_asv, ARGB32_CHAN8, ASScanline::back_color, ASVisual::BGR_mode, ASImageDecoder::buffer, clone_asimage(), copy_asimage_lines(), create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), free_scanline(), IC_NUM_CHANNELS, k, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, MIN, ASImageOutput::next_line, NULL, ASImageOutput::output_image_scanline, prepare_scanline(), result(), SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), and True.

Referenced by TASImage::CreateThumbnail(), handle_asxml_tag_pad(), and TASImage::Pad().

ASImage* pixelize_asimage ( ASVisual asv,
ASImage src,
int  clip_x,
int  clip_y,
int  clip_width,
int  clip_height,
int  pixel_width,
int  pixel_height,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 3204 of file transform.c.

References __transform_fake_asv, a, ASScanline::alpha, b, ASVisual::BGR_mode, ASScanline::blue, ASImageDecoder::buffer, create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), False, free_scanline(), g, ASScanline::green, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, NULL, out_buf, ASImageOutput::output_image_scanline, prepare_scanline(), ASScanline::red, SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), and stop_image_output().

Referenced by handle_asxml_tag_pixelize().

ASImage* scale_asimage ( struct ASVisual asv,
ASImage src,
int  to_width,
int  to_height,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 885 of file transform.c.

References __transform_fake_asv, ASIMAGE_QUALITY_POOR, check_scale_parameters(), create_destination_image(), destroy_asimage(), fprintf(), free(), height, make_scales(), MIN, NULL, QUANT_ERR_BITS, scale_image_down(), scale_image_up(), scale_image_up_dumb(), SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), and width.

Referenced by compose_asimage_xml_from_doc(), TASImage::CreateThumbnail(), direntry2ASImageListEntry(), get_thumbnail_asimage(), handle_asxml_tag_img(), TASImage::Paint(), TASImage::Scale(), and scale_pixmap().

ASImage* scale_asimage2 ( ASVisual asv,
ASImage src,
int  clip_x,
int  clip_y,
int  clip_width,
int  clip_height,
int  to_width,
int  to_height,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 955 of file transform.c.

References __transform_fake_asv, ASIMAGE_QUALITY_POOR, check_scale_parameters(), create_destination_image(), destroy_asimage(), fprintf(), free(), make_scales(), MIN, NULL, QUANT_ERR_BITS, scale_image_down(), scale_image_up(), scale_image_up_dumb(), SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), and stop_image_output().

Referenced by handle_asxml_tag_scale(), and slice_asimage2().

ASImage* slice_asimage ( ASVisual asv,
ASImage src,
int  slice_x_start,
int  slice_x_end,
int  slice_y_start,
int  slice_y_end,
int  to_width,
int  to_height,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 3189 of file transform.c.

References False, and slice_asimage2().

Referenced by TASImage::Slice().

ASImage* slice_asimage2 ( ASVisual asv,
ASImage src,
int  slice_x_start,
int  slice_x_end,
int  slice_y_start,
int  slice_y_end,
int  to_width,
int  to_height,
Bool  scaled,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 2985 of file transform.c.

References __transform_fake_asv, ASA_ASImage, ASVisual::BGR_mode, ASImageDecoder::buffer, create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), False, free_scanline(), int, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, max, min, ASImageOutput::next_line, ASImageDecoder::next_line, NULL, out_buf, ASImageOutput::output_image_scanline, prepare_scanline(), scale_asimage2(), SCL_DO_ALL, SHOW_TIME, slice_scanline(), start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), and ASImageOutput::tiling_step.

Referenced by handle_asxml_tag_slice(), and slice_asimage().

ASImage* tile_asimage ( struct ASVisual asv,
ASImage src,
int  offset_x,
int  offset_y,
int  to_width,
int  to_height,
ARGB32  tint,
ASAltImFormats  out_format,
unsigned int  compression_out,
int  quality 
)

Definition at line 1035 of file transform.c.

References __transform_fake_asv, ASScanline::alpha, ARGB32_ALPHA8, ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, ASScanline::blue, ASImageDecoder::buffer, create_destination_image(), ASImageDecoder::decode_image_scanline, destroy_asimage(), ASScanline::green, LOCAL_DEBUG_CALLER_OUT, LOCAL_DEBUG_OUT, NULL, ASImageOutput::output_image_scanline, ASScanline::red, SCL_DO_ALL, SHOW_TIME, start_image_decoding(), start_image_output(), START_TIME, stop_image_decoding(), stop_image_output(), ASImageOutput::tiling_step, tint_component_mod(), and y.

Referenced by TASImage::BeginPaint(), copyshade_drawable_area(), cut_pixmap(), direntry2ASImageListEntry(), TASImage::DrawText(), TASImage::EndPaint(), fill_with_darkened_background(), TASImage::Gray(), handle_asxml_tag_crop(), handle_asxml_tag_text(), handle_asxml_tag_tile(), TASImage::Image2Drawable(), TASImage::Paint(), scale_pixmap(), and TASImage::Tile().


Generated on Tue Jul 5 15:58:16 2011 for ROOT_528-00b_version by  doxygen 1.5.1