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, extract_format, #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:


796
797
798
# File 'lib/gd2/image.rb', line 796

def self.create_image_sym   #:nodoc:
  :gdImageCreateTrueColor
end

.palette_classObject

:nodoc:


800
801
802
# File 'lib/gd2/image.rb', line 800

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

Instance Method Details

#sharpen(pct) ⇒ Object

:nodoc:


804
805
806
807
# File 'lib/gd2/image.rb', line 804

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