class GD2::Image::IndexedColor
Description¶ ↑
IndexedColor images select pixel colors indirectly through a palette of up to 256 colors. Use GD2::Image#palette to access the associated Palette object.
Public Instance Methods
merge_from(other, dst_x, dst_y, src_x, src_y, w, h, pct, gray = false)
click to toggle source
Like GD2::Image#merge_from except an optional final argument can be specified to preserve the hue of the source by converting the destination pixels to grey scale before the merge.
Calls superclass method
GD2::Image#merge_from
# File lib/gd2/image.rb, line 753 def merge_from(other, dst_x, dst_y, src_x, src_y, w, h, pct, gray = false) return super(other, dst_x, dst_y, src_x, src_y, w, h, pct) unless gray SYM[:gdImageCopyMergeGray].call(image_ptr, other.image_ptr, dst_x, dst_y, src_x, src_y, w, h, pct.to_percent.round) self end