Main > Free Download Search >

Free imager tutorial 0.54 software for linux

imager tutorial 0.54

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 268
Imager::Tutorial 0.54

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;

<<less
Download (0.83MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1094 downloads
PAR::Tutorial 0.941

PAR::Tutorial 0.941


PAR::Tutorial is a cross-platform Packaging and Deployment with PAR. more>>
PAR::Tutorial is a cross-platform Packaging and Deployment with PAR.

SYNOPSIS

This is a tutorial on PAR, first appeared at the 7th Perl Conference. The HTML version of this tutorial is available online as http://aut.dyndns.org/par-tutorial/.

On Deploying Perl Applications

% sshnuke.pl 10.2.2.2 -rootpw="Z1ON0101"
Perl v5.6.1 required--this is only v5.6.0, stopped at sshnuke.pl line 1.
BEGIN failed--compilation aborted at sshnuke.pl line 1.

Q: "Help! I cant run your program!"
A1: Install Perl & perl -MCPAN -einstall(...)
How do we know which modules are needed?
New versions of CPAN modules may break sshnuke.pl
A2: Install Perl & tar zxf my_perllib.tgz
Possibly overwriting existing modules; not cross-platform at all
A3: Use the executable generated by perlcc sshnuke.pl
Impossible to debug; perlcc usually does not work anyway

<<less
Download (0.19MB)
Added: 2006-07-20 License: Perl Artistic License Price:
1194 downloads
Imager::Color 0.54

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.

<<less
Download (0.83MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1092 downloads
Imager::Filters 0.54

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.

<<less
Download (0.83MB)
Added: 2006-10-17 License: Perl Artistic License Price:
1102 downloads
Prima::tutorial 1.20

Prima::tutorial 1.20


Prima::tutorial is an introductory tutorial. more>>
Prima::tutorial is an introductory tutorial.

Programming graphic interfaces is often considered somewhat boring, and not without a cause. It is a small pride in knowing that your buttons and scrollbars work exactly as millions of others buttons and scrollbars do, so whichever GUI toolkit is chosen, it is usually regarded as a tool of small importance, and the less obtrusive, the better.

Given that, and trying to live up to the famous Perl making easy things easy and hard things possible mantra, this manual page is an introductory tutorial meant to show how to write easy things easy. The hard things are explained in the other Prima manual pages ( see Prima ).

<<less
Download (1.4MB)
Added: 2006-08-24 License: Perl Artistic License Price:
1162 downloads
Imager 0.57

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
Imager::Fountain 0.54

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.

<<less
Download (0.83MB)
Added: 2006-09-20 License: Perl Artistic License Price:
1129 downloads
yagg::Tutorial 1.4001

yagg::Tutorial 1.4001


yagg::Tutorial is a Perl module that contains a tutorial for yagg. more>>
yagg::Tutorial is a Perl module that contains a tutorial for yagg.

SYNOPSIS

# To use the generator
./yagg -m nonterminals.yg terminals.lg
./output/progs/generate 5

This tutorial will show you how to use yagg, by way of two examples. In the first example, we create a simple logical expression generator from scratch. In the second example, we create a more sophisticated logical expression generator from existing parser/lexer input files, such as those used by YACC/Bison and LEX/FLEX. These examples, plus another more sophisticated fault tree generator are included with the distribution in the examples/ directory.

It is assumed that the reader knows a little about formal grammars. Ideally, the reader would have some experience writing grammars for input to parser generators like YACC and Bison.

<<less
Download (0.21MB)
Added: 2007-07-05 License: Perl Artistic License Price:
845 downloads
Apache::PAR::tutorial 0.30

Apache::PAR::tutorial 0.30


Apache::PAR::tutorial is a Perl module with information on getting Apache::PAR up and running. more>>
Apache::PAR::tutorial is a Perl module with information on getting Apache::PAR up and running.

Apache::PAR is a framework for including Perl ARchive files in a mod_perl (1.x or 2.x) environment. It allows an author to package up a web application, including configuration, static files, Perl modules, and Registry and PerlRun scripts to include in a single file. This archive can then be moved to other locations on the same system or distributed and loaded with a single set of configuration options in the Apache configuration.

These modules are based on PAR.pm by Autrijus Tang and Archive::Zip by Ned Konz as well as the mod_perl modules. They extend the concept of PAR files to mod_perl, similar to how WAR archives work for Java. An archive (which is really a zip file), contains one or more elements which can be served to clients making requests to an Apache web server. Scripts, modules, and static content should then be able to be served from within the .par archive without modifications.

For the package developer

For the package developer, Apache::PAR allows for easy package management, which frees the author from the task of creating a full Perl package. Apache::PAR allows the package developer to set the required Apache configuration directly in a package which greatly simplifies the install process for the end user and gives the the developer the ability to assign URLs which remain the same on all systems that the package is installed on. It is possible to decompress the contents of the PAR file during startup, which allows the use of code which relies on outside content (templating systems, etc)

For the package user

Once Apache::PAR is installed, it can be configured in an Apache configuration file with as little as two lines. Once setup, to add a new .par package to the system a user only has to place the package in the directory specified in the Apache configuration and restart Apache. All other configuration needs are provided by the module itself.

<<less
Download (0.025MB)
Added: 2006-10-12 License: Perl Artistic License Price:
1107 downloads
IPTables-tutorial 1.2.2

IPTables-tutorial 1.2.2


IPTables-tutorials aim is to explain iptables in a complete and simple way. more>>
IPTables-tutorials aim is to explain iptables in a complete and simple way. The iptables-tutorial is currently rather stable, and contains information on all the currently available matches and targets (in kernel), as well as a couple of complete example scripts and explanations. It contains a complete section on iptables syntax, as well as other interesting commands such as iptables-save and iptables-restore.

The tutorial has recently been under heavy scrutiny and updating, as can be seen in this, the latest version of the tutorial. It is now also available in bookform from Lulu.com. If you feel like contributing or donating to the author of this tutorial, please do buy the book! Thank you!

If you need help, you are better off by asking the netfilter mailing list which you can reach at netfilter at lists.netfilter.org. For more information on this, visit the netfilter mailinglist page. You may also contact the linuxsecurity mailing list at security-discuss AT linuxsecurity dotcom. Both are fairly large, and should be able to help you much much better than I can.

<<less
Download (9.0MB)
Added: 2006-11-22 License: (FDL) GNU Free Documentation License Price:
669 downloads
Imager::Engines 0.54

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.

<<less
Download (0.83MB)
Added: 2006-10-17 License: Perl Artistic License Price:
1102 downloads
Album::Tutorial 1.05

Album::Tutorial 1.05


Album::Tutorial is a Perl module on how to use the Album program. more>>
Album::Tutorial is a Perl module on how to use the Album program.

SYNOPSIS

This tutorial describes the basic use of the Album program to create and maintain browser based photo albums.

Getting started

To get started, create a new directory and cd to it. Create a subdirectory large and put some pictures there. If you have installed the album tool in your execution path, you can now execute it as follows:

$ album -v
No info.dat, adding images from large
info.dat: Cannot update (does not exist)
Number of entries = 7 (7 added)
mkdir thumbnails
mkdir icons
mkdir css
Creating icons: first-gr.png first.png ... sound.png movie.jpg
Creating style sheets: common.css index.css ... journal.css
im023.jpg: thumbnail OK
im024.jpg: thumbnail OK
im025.jpg: thumbnail OK
im026.jpg: thumbnail OK
im027.jpg: thumbnail OK
im028.jpg: thumbnail OK
im029.jpg: thumbnail OK
Creating pages for 7 images
(Needed to write 7 image pages)
Creating pages for 1 index
(Needed to write 1 index page)

Your results will vary, but be similar to this example run. What you can see is that album found 7 images in the large directory, created thumbnails, icons and css directories, created thumbnails by resizing the images, and finally created the HTML pages. You can inspect your first photo album by opening file index.html with your favorite browser. You can click on any image to see the larger version. Navigation buttons are provided to the left of the image.

It is interesting to run album again:

$ album -v
No info.dat, adding images from large
info.dat: Cannot update (does not exist)
Number of entries = 7 (7 added)
.......[7]
Creating pages for 7 images
(No image pages needed updating)
Creating pages for 1 index
(No index pages needed updating)

album tries to avoid doing unnecessary work as much as possible. In this case, all thumbnails and image and index pages are up to date. The line of periods shows progress, one period for each image processed.

<<less
Download (0.049MB)
Added: 2006-11-17 License: Perl Artistic License Price:
1071 downloads
MARC::Doc::Tutorial 2.00

MARC::Doc::Tutorial 2.00


MARC::Doc::Tutorial is a documentation-only module for new users of MARC::Record. more>>
MARC::Doc::Tutorial is a documentation-only module for new users of MARC::Record.

SYNOPSIS

perldoc MARC::Doc::Tutorial

What is MARC?

The MAchine Readable Cataloging format was designed by the Library of Congress in the late 1960s in order to allow libraries to convert their card catalogs into a digital format. The advantages of having computerized card catalogs were soon realized, and now MARC is being used by all sorts of libraries around the world to provide computerized access to their collections. MARC data in transmission format is optimized for processing by computers, so its not very readable for the normal human. For more about the MARC format, visit the Library of Congress at http://www.loc.gov/marc/

What is this Tutorial?

The document you are reading is a beginners guide to using Perl to processing MARC data, written in the cookbook style. Inside, you will find recipes on how to read, write, update and convert MARC data using the MARC::Record CPAN package. As with any cookbook, you should feel free to dip in at any section and use the recipe you find interesting.

If you are new to Perl, you may want to read from the beginning.
The document you are reading is distributed with the MARC::Record package, however in case you are reading it somewhere else, you can find the latest version at CPAN: http://www.cpan.org/modules/by-module/MARC/. Youll notice that some sections arent filled in yet, which is a result of this document being a work in progress. If you have ideas for new sections please make a suggestion to perl4lib: http://www.rice.edu/perl4lib/.

<<less
Download (0.77MB)
Added: 2007-07-10 License: GPL (GNU General Public License) Price:
836 downloads
Derbrill Tutorials

Derbrill Tutorials


Derbrill Tutorials are Free Tutorials For Writing Games and Multimedia Applications in Runtime Revolution with ArcadeEngine. more>>
Derbrill Tutorials are Free Tutorials For Writing Games and Multimedia Applications in Runtime Revolution with ArcadeEngine.

The tutorials come in a visually appealing e-book format which is both easy to read and use, the range of topics covered includes:

* The basics of Revolution such as: stacks, cards, scripts, messages and timers
* How to use geometric properties such as distances, angles and intersection rectangles
* Understanding and using different movements including linear, polygonal, circular and elliptic
* Advanced use of images
* Using the built-in collision detection
<<less
Download (4.2MB)
Added: 2005-10-17 License: Freeware Price:
1470 downloads
Tkx::Tutorial 1.04

Tkx::Tutorial 1.04


Tkx::Tutorial Perl module contains a tutorial about how to use Tkx. more>>
Tkx::Tutorial Perl module contains a tutorial about how to use Tkx.

Tk is a toolkit that allows you to create applications with graphical interfaces for Windows, Mac OS X and X11. The Tk toolkit is native to the Tcl programming language, but its ease of use and cross-platform availability has made it the GUI toolkit of choice for many other dynamic languages as well.

Tkx is a Perl module that makes the Tk toolkit available to Perl programs. By loading the Tkx module Perl programs can create windows and fill them with text, images, buttons and other controls that make up the user interface of the application.

Hello World

Lets start with the mandatory exercise of creating an application that greats the world. Here we make the application window contain a single button which will shut down the application if clicked. The code to make this happen is:

use Tkx;

Tkx::button(".b",
-text => "Hello, world",
-command => sub { Tkx::destroy("."); },
);
Tkx::pack(".b");

Tkx::MainLoop()

Save this to a file called hello.pl and then run perl hello.pl to start up the application. A window with the text "Hello, world" should appear on your screen.
After the Tkx module has been loaded by the use Tkx statement the application will show an empty window called ".". We create a button with the name ".b" and tell the window to display the button with the call to Tkx::pack(). After the layout of the window has been set up we need to pass control back to Tk so that it can draw the window and invoke our callback if the button is clicked. This is achieved by the Tkx::MainLoop() call at the end. Clicking the button will invoke the subroutine registered with the -command option of the button. In this case the callback simply destroys the window, which in turn will terminate the application.

<<less
Download (0.024MB)
Added: 2007-07-21 License: Perl Artistic License Price:
836 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5