Class: GD2::Image::TrueColor

Inherits:
GD2::Image show all
Defined in:
lib/gd2/image.rb

Overview

Description

TrueColor images represent pixel colors directly and have no palette limitations.

Instance Attribute Summary

Attributes inherited from GD2::Image

#image_ptr, #palette

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from GD2::Image

#==, #[], #[]=, #alpha_blending=, #alpha_blending?, #aspect, #clipping, #clips?, #color2pixel, #compare, #copy_from, #copy_from_rotated, create_image_ptr, #crop, #crop!, #draw, #dup, #each, #export, #gd, #gd2, #get_pixel, #gif, #height, import, #init_with_image, #init_with_size, #inspect, #interlaced=, #interlaced?, #jpeg, load, #merge_from, new, #optimize_palette, #pixel2color, #png, #polar_transform, #polar_transform!, #resize, #resize!, #rotate, #rotate!, #save_alpha=, #save_alpha?, #set_pixel, #size, #to_indexed_color, #to_true_color, #transparent, #transparent=, #true_color?, #uncrop, #uncrop!, #wbmp, #width, #with_clipping

Class Method Details

.create_image_symObject

:nodoc:



782
783
784
# File 'lib/gd2/image.rb', line 782

def self.create_image_sym   #:nodoc:
  :gdImageCreateTrueColor
end

.palette_classObject

:nodoc:



786
787
788
# File 'lib/gd2/image.rb', line 786

def self.palette_class  #:nodoc:
  Palette::TrueColor
end

Instance Method Details

#sharpen(pct) ⇒ Object

:nodoc:



790
791
792
793
# File 'lib/gd2/image.rb', line 790

def sharpen(pct)  #:nodoc:
  GD2FFI.send(:gdImageSharpen, image_ptr, pct.to_percent.round.to_i)
  self
end