imager color 0.54
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1243
Imager::Color 0.54
Imager::Color is a Perl module with color handling for Imager. more>>
Imager::Color is a Perl module with color handling for Imager.
SYNOPSIS
$color = Imager::Color->new($red, $green, $blue);
$color = Imager::Color->new($red, $green, $blue, $alpha);
$color = Imager::Color->new("#C0C0FF"); # html color specification
$color->set($red, $green, $blue);
$color->set($red, $green, $blue, $alpha);
$color->set("#C0C0FF"); # html color specification
($red, $green, $blue, $alpha) = $color->rgba();
@hsv = $color->hsv(); # not implemented but proposed
$color->info();
if ($color->equals(other=>$other_color)) {
...
}
This module handles creating color objects used by imager. The idea is that in the future this module will be able to handle colorspace calculations as well.
new
This creates a color object to pass to functions that need a color argument.
set
This changes an already defined color. Note that this does not affect any places where the color has been used previously.
rgba
This returns the rgba code of the color the object contains.
info
Calling info merely dumps the relevant colorcode to the log.
equals(other=>$other_color)
equals(other=>$other_color, ignore_alpha=>1)
Compares $self and color $other_color returning true if the color components are the same.
Compares all four channels unless ignore_alpha is set. If ignore_alpha is set only the first three channels are compared.
You can specify colors in several different ways, you can just supply simple values:
simple numeric parameters - if you supply 3 or 4 numeric arguments, you get a color made up of those RGB (and possibly A) components.
a six hex digit web color, either RRGGBB or #RRGGBB
an eight hex digit web color, either RRGGBBAA or #RRGGBBAA.
a 3 hex digit web color, #RGB - a value of F becomes 255.
a color name, from whichever of the gimp Named_Colors file or X rgb.txt is found first. The same as using the name keyword.
You can supply named parameters:
red, green and blue, optionally shortened to r, g and b. The color components in the range 0 to 255.
# all of the following are equivalent
my $c1 = Imager::Color->new(red=>100, blue=>255, green=>0);
my $c2 = Imager::Color->new(r=>100, b=>255, g=>0);
my $c3 = Imager::Color->new(r=>100, blue=>255, g=>0);
hue, saturation and value, optionally shortened to h, s and v, to specify a HSV color. 0 new(hue=>120, value=>1, saturation=>0.5);
web, which can specify a 6 or 3 hex digit web color, in any of the forms #RRGGBB, #RGB, RRGGBB or RGB.
my $c1 = Imager::Color->new(web=>#FFC0C0); # pale red
gray or grey which specifies a single channel, from 0 to 255.
# exactly the same
my $c1 = Imager::Color->new(gray=>128);
my $c1 = Imager::Color->new(grey=>128);
rgb which takes a 3 member arrayref, containing each of the red, green and blue values.
# the same
my $c1 = Imager::Color->new(rgb=>[255, 100, 0]);
my $c1 = Imager::Color->new(r=>255, g=>100, b=>0);
hsv which takes a 3 member arrayref, containting each of hue, saturation and value.
# the same
my $c1 = Imager::Color->new(hsv=>[120, 0.5, 1]);
my $c1 = Imager::Color->new(hue=>120, v=>1, s=>0.5);
gimp which specifies a color from a GIMP palette file. You can specify the filename of the palette file with the palette parameter, or let Imager::Color look in various places, typically "$HOME/gimp-1.x/palettes/Named_Colors" with and without the version number, and in /usr/share/gimp/palettes/. The palette file must have color names.
my $c1 = Imager::Color->new(gimp=>snow);
my $c1 = Imager::Color->new(gimp=>snow, palette=>testimg/test_gimp_pal);
xname which specifies a color from an X11 rgb.txt file. You can specify the filename of the rgb.txt file with the palette parameter, or let Imager::Color look in various places, typically /usr/lib/X11/rgb.txt.
my $c1 = Imager::Color->new(xname=>blue) # usually RGB(0, 0, 255)
builtin which specifies a color from the built-in color table in Imager::Color::Table. The colors in this module are the same as the default X11 rgb.txt file.
my $c1 = Imager::Color->new(builtin=>black) # always RGB(0, 0, 0)
name which specifies a name from either a GIMP palette, an X rgb.txt file or the built-in color table, whichever is found first.
channel0, channel1, etc, each of which specifies a single channel. These can be abbreviated to c0, c1 etc.
channels which takes an arrayref of the channel values.
Optionally you can add an alpha channel to a color with the alpha or a parameter.
These color specifications can be used for both constructing new colors with the new() method and modifying existing colors with the set() method.
<<lessSYNOPSIS
$color = Imager::Color->new($red, $green, $blue);
$color = Imager::Color->new($red, $green, $blue, $alpha);
$color = Imager::Color->new("#C0C0FF"); # html color specification
$color->set($red, $green, $blue);
$color->set($red, $green, $blue, $alpha);
$color->set("#C0C0FF"); # html color specification
($red, $green, $blue, $alpha) = $color->rgba();
@hsv = $color->hsv(); # not implemented but proposed
$color->info();
if ($color->equals(other=>$other_color)) {
...
}
This module handles creating color objects used by imager. The idea is that in the future this module will be able to handle colorspace calculations as well.
new
This creates a color object to pass to functions that need a color argument.
set
This changes an already defined color. Note that this does not affect any places where the color has been used previously.
rgba
This returns the rgba code of the color the object contains.
info
Calling info merely dumps the relevant colorcode to the log.
equals(other=>$other_color)
equals(other=>$other_color, ignore_alpha=>1)
Compares $self and color $other_color returning true if the color components are the same.
Compares all four channels unless ignore_alpha is set. If ignore_alpha is set only the first three channels are compared.
You can specify colors in several different ways, you can just supply simple values:
simple numeric parameters - if you supply 3 or 4 numeric arguments, you get a color made up of those RGB (and possibly A) components.
a six hex digit web color, either RRGGBB or #RRGGBB
an eight hex digit web color, either RRGGBBAA or #RRGGBBAA.
a 3 hex digit web color, #RGB - a value of F becomes 255.
a color name, from whichever of the gimp Named_Colors file or X rgb.txt is found first. The same as using the name keyword.
You can supply named parameters:
red, green and blue, optionally shortened to r, g and b. The color components in the range 0 to 255.
# all of the following are equivalent
my $c1 = Imager::Color->new(red=>100, blue=>255, green=>0);
my $c2 = Imager::Color->new(r=>100, b=>255, g=>0);
my $c3 = Imager::Color->new(r=>100, blue=>255, g=>0);
hue, saturation and value, optionally shortened to h, s and v, to specify a HSV color. 0 new(hue=>120, value=>1, saturation=>0.5);
web, which can specify a 6 or 3 hex digit web color, in any of the forms #RRGGBB, #RGB, RRGGBB or RGB.
my $c1 = Imager::Color->new(web=>#FFC0C0); # pale red
gray or grey which specifies a single channel, from 0 to 255.
# exactly the same
my $c1 = Imager::Color->new(gray=>128);
my $c1 = Imager::Color->new(grey=>128);
rgb which takes a 3 member arrayref, containing each of the red, green and blue values.
# the same
my $c1 = Imager::Color->new(rgb=>[255, 100, 0]);
my $c1 = Imager::Color->new(r=>255, g=>100, b=>0);
hsv which takes a 3 member arrayref, containting each of hue, saturation and value.
# the same
my $c1 = Imager::Color->new(hsv=>[120, 0.5, 1]);
my $c1 = Imager::Color->new(hue=>120, v=>1, s=>0.5);
gimp which specifies a color from a GIMP palette file. You can specify the filename of the palette file with the palette parameter, or let Imager::Color look in various places, typically "$HOME/gimp-1.x/palettes/Named_Colors" with and without the version number, and in /usr/share/gimp/palettes/. The palette file must have color names.
my $c1 = Imager::Color->new(gimp=>snow);
my $c1 = Imager::Color->new(gimp=>snow, palette=>testimg/test_gimp_pal);
xname which specifies a color from an X11 rgb.txt file. You can specify the filename of the rgb.txt file with the palette parameter, or let Imager::Color look in various places, typically /usr/lib/X11/rgb.txt.
my $c1 = Imager::Color->new(xname=>blue) # usually RGB(0, 0, 255)
builtin which specifies a color from the built-in color table in Imager::Color::Table. The colors in this module are the same as the default X11 rgb.txt file.
my $c1 = Imager::Color->new(builtin=>black) # always RGB(0, 0, 0)
name which specifies a name from either a GIMP palette, an X rgb.txt file or the built-in color table, whichever is found first.
channel0, channel1, etc, each of which specifies a single channel. These can be abbreviated to c0, c1 etc.
channels which takes an arrayref of the channel values.
Optionally you can add an alpha channel to a color with the alpha or a parameter.
These color specifications can be used for both constructing new colors with the new() method and modifying existing colors with the set() method.
Download (0.83MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1092 downloads
Imager 0.57
Imager script is a Perl extension for generating 24-bit images. more>>
Imager script is a Perl extension for generating 24-bit images.
<<less Download (0.83MB)
Added: 2007-05-16 License: Perl Artistic License Price:
891 downloads
gcolor2 0.4
gcolor2 is a simple GTK+2 color selector. more>>
gcolor2 is a simple color selector that was originally based on gcolor, ported to use GTK+2, and now has a completely new UI.
Enhancements:
- Improvements include usability / UI enhancements, and sortable columns.
<<lessEnhancements:
- Improvements include usability / UI enhancements, and sortable columns.
Download (0.36MB)
Added: 2005-08-05 License: GPL (GNU General Public License) Price:
1544 downloads
Imager::Filters 0.54
Imager::Filters is an entire image filtering operations. more>>
Imager::Filters is an entire image filtering operations.
SYNOPSIS
use Imager;
$img = ...;
$img->filter(type=>autolevels);
$img->filter(type=>autolevels, lsat=>0.2);
$img->filter(type=>turbnoise)
# and lots of others
load_plugin("dynfilt/dyntest.so")
or die "unable to load pluginn";
$img->filter(type=>lin_stretch, a=>35, b=>200);
unload_plugin("dynfilt/dyntest.so")
or die "unable to load pluginn";
$out = $img->difference(other=>$other_img);
Filters are operations that have similar calling interface.
filter
Parameters:
type - the type of filter, see "Types of Filters".
many other possible parameters, see "Types of Filters" below.
<<lessSYNOPSIS
use Imager;
$img = ...;
$img->filter(type=>autolevels);
$img->filter(type=>autolevels, lsat=>0.2);
$img->filter(type=>turbnoise)
# and lots of others
load_plugin("dynfilt/dyntest.so")
or die "unable to load pluginn";
$img->filter(type=>lin_stretch, a=>35, b=>200);
unload_plugin("dynfilt/dyntest.so")
or die "unable to load pluginn";
$out = $img->difference(other=>$other_img);
Filters are operations that have similar calling interface.
filter
Parameters:
type - the type of filter, see "Types of Filters".
many other possible parameters, see "Types of Filters" below.
Download (0.83MB)
Added: 2006-10-17 License: Perl Artistic License Price:
1102 downloads
Imager::Tutorial 0.54
Imager::Tutorial is an introduction to Imager. more>>
Imager::Tutorial is an introduction to Imager.
Before you start
If you have the necessary knowledge, install the image format libraries you want Imager image file support for, and Imager itself, otherwise arrange to have it done.
You will also want some sort of image viewer tool, whether an image editor like Photoshop or the GIMP, or a web browser.
Hello Boxes! - A Simple Start
As with any perl program its useful to start with a #! line, and to enable strict mode:
#!/usr/bin/perl -w
# you might to use warnings; instead of the -w above
use strict;
These lines will be omitted in further examples.
As with any module, you need to load it:
use Imager;
Now create a image to draw on:
my $image = Imager->new(xsize => 100, ysize => 100);
and draw a couple of filled rectangles on it:
$image->box(xmin => 0, ymin => 0, xmax => 99, ymax => 99,
filled => 1, color => blue);
$image->box(xmin => 20, ymin => 20, xmax => 79, ymax => 79,
filled => 1, color => green);
Since the first box fills the whole image, it can be simplified to:
$image->box(filled => 1, color => blue);
and save it to a file:
$image->write(file=>tutorial1.ppm)
or die Cannot save tutorial1.ppm: , $image->errstr;
So our completed program is:
use Imager;
my $image = Imager->new(xsize => 100, ysize => 100);
$image->box(filled => 1, color => blue);
$image->box(xmin => 20, ymin => 20, xmax => 79, ymax => 79,
filled => 1, color => green);
$image->write(file=>tutorial1.ppm)
or die Cannot save tutorial1.ppm: , $image->errstr;
<<lessBefore you start
If you have the necessary knowledge, install the image format libraries you want Imager image file support for, and Imager itself, otherwise arrange to have it done.
You will also want some sort of image viewer tool, whether an image editor like Photoshop or the GIMP, or a web browser.
Hello Boxes! - A Simple Start
As with any perl program its useful to start with a #! line, and to enable strict mode:
#!/usr/bin/perl -w
# you might to use warnings; instead of the -w above
use strict;
These lines will be omitted in further examples.
As with any module, you need to load it:
use Imager;
Now create a image to draw on:
my $image = Imager->new(xsize => 100, ysize => 100);
and draw a couple of filled rectangles on it:
$image->box(xmin => 0, ymin => 0, xmax => 99, ymax => 99,
filled => 1, color => blue);
$image->box(xmin => 20, ymin => 20, xmax => 79, ymax => 79,
filled => 1, color => green);
Since the first box fills the whole image, it can be simplified to:
$image->box(filled => 1, color => blue);
and save it to a file:
$image->write(file=>tutorial1.ppm)
or die Cannot save tutorial1.ppm: , $image->errstr;
So our completed program is:
use Imager;
my $image = Imager->new(xsize => 100, ysize => 100);
$image->box(filled => 1, color => blue);
$image->box(xmin => 20, ymin => 20, xmax => 79, ymax => 79,
filled => 1, color => green);
$image->write(file=>tutorial1.ppm)
or die Cannot save tutorial1.ppm: , $image->errstr;
Download (0.83MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1094 downloads
Imager::Fountain 0.54
Imager::Fountain is a class for building fountain fills suitable for use by the fountain filter. more>>
Imager::Fountain is a class for building fountain fills suitable for use by the fountain filter.
SYNOPSIS
use Imager::Fountain;
my $f1 = Imager::Fountain->read(gimp=>$filename);
$f->write(gimp=>$filename);
my $f1 = Imager::Fountain->new;
$f1->add(start=>0, middle=>0.5, end=>1.0,
c0=>Imager::Color->new(...),
c1=>Imager::Color->new(...),
type=>$trans_type, color=>$color_trans_type);
Provide an interface to build arrays suitable for use by the Imager fountain filter. These can be loaded from or saved to a GIMP gradient file or you can build them from scratch.
<<lessSYNOPSIS
use Imager::Fountain;
my $f1 = Imager::Fountain->read(gimp=>$filename);
$f->write(gimp=>$filename);
my $f1 = Imager::Fountain->new;
$f1->add(start=>0, middle=>0.5, end=>1.0,
c0=>Imager::Color->new(...),
c1=>Imager::Color->new(...),
type=>$trans_type, color=>$color_trans_type);
Provide an interface to build arrays suitable for use by the Imager fountain filter. These can be loaded from or saved to a GIMP gradient file or you can build them from scratch.
Download (0.83MB)
Added: 2006-09-20 License: Perl Artistic License Price:
1129 downloads
Imager::Engines 0.54
Imager::Engines is a Perl module for programmable transformation operations. more>>
Imager::Engines is a Perl module for programmable transformation operations.
SYNOPSIS
use Imager;
my %opts;
my @imgs;
my $img;
...
my $newimg = $img->transform(
xexpr=>x,
yexpr=>y+10*sin((x+y)/10))
or die $img->errstr;
my $newimg = Imager::transform2(%opts, @imgs)
or die "transform2 failed: $Imager::ERRSTR";
my $newimg = $img->matrix_transform(
matrix=>[ -1, 0, $img->getwidth-1,
0, 1, 0,
0, 0, 1 ]);
transform
The transform() function can be used to generate spatial warps and rotations and such effects. It only operates on a single image and its only function is to displace pixels.
It can be given the operations in postfix notation or the module Affix::Infix2Postfix can be used to generate postfix code from infix code. Look in the test case t/t55trans.t for an example.
transform() needs expressions (or opcodes) that determine the source pixel for each target pixel. Source expressions are infix expressions using any of the +, -, *, / or ** binary operators, the - unary operator, ( and ) for grouping and the sin() and cos() functions. The target pixel is input as the variables x and y.
You specify the x and y expressions as xexpr and yexpr respectively. You can also specify opcodes directly, but thats magic deep enough that you can look at the source code.
<<lessSYNOPSIS
use Imager;
my %opts;
my @imgs;
my $img;
...
my $newimg = $img->transform(
xexpr=>x,
yexpr=>y+10*sin((x+y)/10))
or die $img->errstr;
my $newimg = Imager::transform2(%opts, @imgs)
or die "transform2 failed: $Imager::ERRSTR";
my $newimg = $img->matrix_transform(
matrix=>[ -1, 0, $img->getwidth-1,
0, 1, 0,
0, 0, 1 ]);
transform
The transform() function can be used to generate spatial warps and rotations and such effects. It only operates on a single image and its only function is to displace pixels.
It can be given the operations in postfix notation or the module Affix::Infix2Postfix can be used to generate postfix code from infix code. Look in the test case t/t55trans.t for an example.
transform() needs expressions (or opcodes) that determine the source pixel for each target pixel. Source expressions are infix expressions using any of the +, -, *, / or ** binary operators, the - unary operator, ( and ) for grouping and the sin() and cos() functions. The target pixel is input as the variables x and y.
You specify the x and y expressions as xexpr and yexpr respectively. You can also specify opcodes directly, but thats magic deep enough that you can look at the source code.
Download (0.83MB)
Added: 2006-10-17 License: Perl Artistic License Price:
1102 downloads
Imager::interface.pod 0.54
Imager::interface.pod decribes the C level virtual image interface. more>>
Imager::interface.pod decribes the C level virtual image interface.
The Imager virtual interface aims to allow image types to be created for special purposes, both to allow consistent access to images with different sample sizes, and organizations, but also to allow creation of synthesized or virtual images.
This is a C level interface rather than Perl.
<<lessThe Imager virtual interface aims to allow image types to be created for special purposes, both to allow consistent access to images with different sample sizes, and organizations, but also to allow creation of synthesized or virtual images.
This is a C level interface rather than Perl.
Download (0.83MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1092 downloads
libGarbageCollector 1.1
libGarbageCollector is an incremental garbage collector with a tri-color, Baker treadmill, write-barrier implementation. more>>
libGarbageCollector is an incremental garbage collector with a tri-color, Baker treadmill, write-barrier implementation.
libGarbageCollector is built from the garbage collector code used in the Io programming language project.
<<lesslibGarbageCollector is built from the garbage collector code used in the Io programming language project.
Download (0.034MB)
Added: 2006-05-22 License: BSD License Price:
1252 downloads
YACY 0.54
YACY is a distributed Web crawler and also a caching HTTP/HTTPS proxy. more>>
YACY is a distributed Web crawler and also a caching HTTP/HTTPS proxy. Pages that pass through the proxy are indexed and can be searched using a built-in HTTP server.
YACY peers connect each other and form a P2P-based index exchange network based on distributed hash tables. Explicit web crawls can be done locally or collaboratively, forming a global search and distributed indexing engine for the Web.
YACY also provides URL filtering with blacklist sharing among other proxy peers, individual Web and servlet page hosting, a file sharing zone, and a database engine.
Main features:
- Search your own or the global index
- Crawl your own pages or start distributed crawling
- Run your peer to support other YaCy crawlers
- Provide Information on your peer using the built-in http-server, file-sharing zone and wiki
- Built-in caching http proxy
- Indexing benefits from the proxy cache; private information is not stored or indexed
- Usage of the proxy is not a requisite for web indexing, but it enables you to access the new top-level-domains .yacy
- Filter unwanted content like ad- or spyware; share your web-blacklist with other peers
- Easy installation! No additional database required!
- No central server!
- GPLed, freeware
Enhancements:
- An auto-updater and support for multiple search networks have been added, and the option to index intranet sites in separated networks has been enabled.
- Some interface functions have also been enhanced.
<<lessYACY peers connect each other and form a P2P-based index exchange network based on distributed hash tables. Explicit web crawls can be done locally or collaboratively, forming a global search and distributed indexing engine for the Web.
YACY also provides URL filtering with blacklist sharing among other proxy peers, individual Web and servlet page hosting, a file sharing zone, and a database engine.
Main features:
- Search your own or the global index
- Crawl your own pages or start distributed crawling
- Run your peer to support other YaCy crawlers
- Provide Information on your peer using the built-in http-server, file-sharing zone and wiki
- Built-in caching http proxy
- Indexing benefits from the proxy cache; private information is not stored or indexed
- Usage of the proxy is not a requisite for web indexing, but it enables you to access the new top-level-domains .yacy
- Filter unwanted content like ad- or spyware; share your web-blacklist with other peers
- Easy installation! No additional database required!
- No central server!
- GPLed, freeware
Enhancements:
- An auto-updater and support for multiple search networks have been added, and the option to index intranet sites in separated networks has been enabled.
- Some interface functions have also been enhanced.
Download (5.7MB)
Added: 2007-08-11 License: GPL (GNU General Public License) Price:
806 downloads
Imager::TimelineDiagram 0.15
Imager::TimelineDiagram is a Perl extension for creating Timeline Diagrams (designed to show system interaction over time). more>>
Imager::TimelineDiagram is a Perl extension for creating Timeline Diagrams (designed to show system interaction over time).
SYNOPSIS
use Imager::TimelineDiagram;
use Imager::Font;
my $tg = Imager::TimelineDiagram->new(
#maxTime => 10,
#dataLabelSide => left,
labelFont => Imager::Font->new(file => t/ImUgly.ttf),
);
$tg->set_milestones(qw(A B C D E));
my @points = (
# From, To, AtTime
[A,B,1.0],
[B,C,2.0],
[C,D,3.3],
[D,C,4.3],
[C,A,5.0],
);
$tg->add_points(@points);
$tg->write(foo.png);
<<lessSYNOPSIS
use Imager::TimelineDiagram;
use Imager::Font;
my $tg = Imager::TimelineDiagram->new(
#maxTime => 10,
#dataLabelSide => left,
labelFont => Imager::Font->new(file => t/ImUgly.ttf),
);
$tg->set_milestones(qw(A B C D E));
my @points = (
# From, To, AtTime
[A,B,1.0],
[B,C,2.0],
[C,D,3.3],
[D,C,4.3],
[C,A,5.0],
);
$tg->add_points(@points);
$tg->write(foo.png);
Download (0.084MB)
Added: 2007-04-24 License: Perl Artistic License Price:
913 downloads
colorname 0.1
colorname is both a plugin for The Gimp as well as a standalone tool that tries to assign a name to a color, using external colo more>>
colorname is both a plugin for The Gimp as well as a standalone tool that tries to assign a name to a color, using external color definitions and linear algebra.
For this it calculates the euclidean distance between the currently selected color and all predefined colors, either in the RGB or HSV color space.
This project is licensed under the GPLv3.
Usage:
Standalone
Just start colorname.py
Gimp plugin
Once installed you can find colorname in the GIMP under: ”< Toolbox >/Xtns/Colorname”
<<lessFor this it calculates the euclidean distance between the currently selected color and all predefined colors, either in the RGB or HSV color space.
This project is licensed under the GPLv3.
Usage:
Standalone
Just start colorname.py
Gimp plugin
Once installed you can find colorname in the GIMP under: ”< Toolbox >/Xtns/Colorname”
Download (0.030MB)
Added: 2007-08-14 License: GPL v3 Price:
804 downloads
Color Label 0.3.5
Color Label is a service menu for KDE based on Color Folder 0.3.4 by HessiJames. more>>
Color Label is a service menu for KDE based on Color Folder 0.3.4 by HessiJames.
HowTo:
Extract all files and
copy colorlabel into /usr/bin/...
perhaps you need to make it executable chmod 755 /usr/bin/colorlabel
copy colorlabel.desktop to /home/~/.kde/share/apps/konqueror/servicemenus/colorlabel.desktop
<<lessHowTo:
Extract all files and
copy colorlabel into /usr/bin/...
perhaps you need to make it executable chmod 755 /usr/bin/colorlabel
copy colorlabel.desktop to /home/~/.kde/share/apps/konqueror/servicemenus/colorlabel.desktop
Download (0.003MB)
Added: 2007-08-07 License: GPL (GNU General Public License) Price:
505 downloads
GD::Graph::colour 1.44
GD::Graph::colour contains colour manipulation routines for use with GD::Graph. more>>
GD::Graph::colour contains colour manipulation routines for use with GD::Graph.
SYNOPSIS
use GD::Graph::colour qw(:colours :lists :files :convert);
The GD::Graph::colour package provides a few routines to work with colours. The functionality of this package is mainly defined by what is needed, now and historically, by the GD::Graph modules.
FUNCTIONS
colour_list( number of colours )
Returns a list of number of colours colour names known to the package. Exported with the :lists tag.
sorted_colour_list( number of colours )
Returns a list of number of colours colour names known to the package, sorted by luminance or hue. NB. Right now it always sorts by luminance. Will add an option in a later stage to decide sorting method at run time. Exported with the :lists tag.
_rgb( colour name )
Returns a list of the RGB values of colour name. if the colour name is a string of the form that is acceptable to the hex2rgb sub, then the colour will be added to the list dynamically. Exported with the :colours tag.
_hue( R,G,B )
Returns the hue of the colour with the specified RGB values. Exported with the :colours tag.
_luminance( R,G,B )
Returns the luminance of the colour with the specified RGB values. Exported with the :colours tag.
add_colour(colourname => [$r, $g, $b]) or add_colour(#7fe310)
Self-explanatory. Exported with the :colours tag.
rgb2hex($red, $green, $blue)
hex2rgb(#7fe310)
These functions translate a list of RGB values into a hexadecimal string, as is commonly used in HTML and the Image::Magick API, and vice versa. Exported with the :convert tag.
read_rgb( file name )
Reads in colours from a rgb file as used by the X11 system.
Doing something like:
use GD::Graph::bars;
use GD::Graph::colour;
GD::Graph::colour::read_rgb("rgb.txt") or die "cannot read colours";
Will allow you to use any colours defined in rgb.txt in your graph. Exported with the :files tag.
<<lessSYNOPSIS
use GD::Graph::colour qw(:colours :lists :files :convert);
The GD::Graph::colour package provides a few routines to work with colours. The functionality of this package is mainly defined by what is needed, now and historically, by the GD::Graph modules.
FUNCTIONS
colour_list( number of colours )
Returns a list of number of colours colour names known to the package. Exported with the :lists tag.
sorted_colour_list( number of colours )
Returns a list of number of colours colour names known to the package, sorted by luminance or hue. NB. Right now it always sorts by luminance. Will add an option in a later stage to decide sorting method at run time. Exported with the :lists tag.
_rgb( colour name )
Returns a list of the RGB values of colour name. if the colour name is a string of the form that is acceptable to the hex2rgb sub, then the colour will be added to the list dynamically. Exported with the :colours tag.
_hue( R,G,B )
Returns the hue of the colour with the specified RGB values. Exported with the :colours tag.
_luminance( R,G,B )
Returns the luminance of the colour with the specified RGB values. Exported with the :colours tag.
add_colour(colourname => [$r, $g, $b]) or add_colour(#7fe310)
Self-explanatory. Exported with the :colours tag.
rgb2hex($red, $green, $blue)
hex2rgb(#7fe310)
These functions translate a list of RGB values into a hexadecimal string, as is commonly used in HTML and the Image::Magick API, and vice versa. Exported with the :convert tag.
read_rgb( file name )
Reads in colours from a rgb file as used by the X11 system.
Doing something like:
use GD::Graph::bars;
use GD::Graph::colour;
GD::Graph::colour::read_rgb("rgb.txt") or die "cannot read colours";
Will allow you to use any colours defined in rgb.txt in your graph. Exported with the :files tag.
Download (0.15MB)
Added: 2007-08-07 License: Perl Artistic License Price:
808 downloads
Graphics::ColorObject 0.5.0
Graphics::ColorObject can convert between color spaces. more>>
Graphics::ColorObject can convert between color spaces.
SYNOPSIS
use Graphics::ColorObject;
# rgb to hsv
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $v) = @{ $color->as_HSV() };
# one rgb space to another (NTSC to PAL)
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>NTSC);
($r, $g, $b) = @{ $color->as_RGB(space=>PAL) };
ABSTRACT
Use this module to convert between all the common color spaces. As a pure Perl module, it is not very fast, and so it you want to convert entire images quickly, this is probably not what you want. The emphasis is on completeness and accurate conversion.
Supported color spaces are: RGB (including sRGB, Apple, Adobe, CIE Rec 601, CIE Rec 709, CIE ITU, and about a dozen other RGB spaces), CMY, CMYK, HSL, HSV, XYZ, xyY, Lab, LCHab, Luv, LCHuv, YPbPr, YCbCr, YUV, YIQ, PhotoYCC.
Conversion between different RGB working spaces, and between different white-points, is fully supported.
For any supported color space XXX, there is one constructor new_XXX that creates a color using data in that color space, and one method as_XXX that returns the current color as expressed in that color space. For example, for RGB there is new_RGB and as_RGB. The color data is always passed as an array reference to a three-element array (four-element in the case of CMYK). Thus, to convert from RGB to HSL, you can use:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $l) = @{ $color->as_HSL() };
The constructor can always take a hash of optional arguments in addition to the color value, namely the working RGB space and the white point. For example:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>Adobe, white_point=>D65);
For a list of all supported color spaces, call Graphics::ColorObject->list_colorspaces(). For a list of all RGB working spaces and of all white points that this module supports, call Graphics::ColorObject->list_rgb_spaces() and Graphics::ColorObject->list_white_points().
If not specified, the working RGB space will be sRGB. Many non-RGB conversions also rely on an implicit RGB space, and passing an RGB space as an option (either to the constructor or later) will have an effect on the values.
<<lessSYNOPSIS
use Graphics::ColorObject;
# rgb to hsv
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $v) = @{ $color->as_HSV() };
# one rgb space to another (NTSC to PAL)
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>NTSC);
($r, $g, $b) = @{ $color->as_RGB(space=>PAL) };
ABSTRACT
Use this module to convert between all the common color spaces. As a pure Perl module, it is not very fast, and so it you want to convert entire images quickly, this is probably not what you want. The emphasis is on completeness and accurate conversion.
Supported color spaces are: RGB (including sRGB, Apple, Adobe, CIE Rec 601, CIE Rec 709, CIE ITU, and about a dozen other RGB spaces), CMY, CMYK, HSL, HSV, XYZ, xyY, Lab, LCHab, Luv, LCHuv, YPbPr, YCbCr, YUV, YIQ, PhotoYCC.
Conversion between different RGB working spaces, and between different white-points, is fully supported.
For any supported color space XXX, there is one constructor new_XXX that creates a color using data in that color space, and one method as_XXX that returns the current color as expressed in that color space. For example, for RGB there is new_RGB and as_RGB. The color data is always passed as an array reference to a three-element array (four-element in the case of CMYK). Thus, to convert from RGB to HSL, you can use:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $l) = @{ $color->as_HSL() };
The constructor can always take a hash of optional arguments in addition to the color value, namely the working RGB space and the white point. For example:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>Adobe, white_point=>D65);
For a list of all supported color spaces, call Graphics::ColorObject->list_colorspaces(). For a list of all RGB working spaces and of all white points that this module supports, call Graphics::ColorObject->list_rgb_spaces() and Graphics::ColorObject->list_white_points().
If not specified, the working RGB space will be sRGB. Many non-RGB conversions also rely on an implicit RGB space, and passing an RGB space as an option (either to the constructor or later) will have an effect on the values.
Download (0.022MB)
Added: 2006-08-05 License: Perl Artistic License Price:
1175 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above imager color 0.54 search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed