Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imager::inline(3pm) [debian man page]

Imager::Inline(3pm)					User Contributed Perl Documentation				       Imager::Inline(3pm)

NAME
Imager::Inline - using Imager with Inline::C. SYNOPSIS
use Inline with => 'Imager'; use Inline C => <<'EOS'; Imager some_func(Imager::Color c, Imager::Fill f) { Imager img = i_img_8_new(200, 200, 3); /* fill with color */ i_box_filled(img, 0, 0, 199, 199, c); /* inner area with fill */ i_box_cfill(img, 50, 50, 149, 149, f); return img; } EOS DESCRIPTION
Imager hooks into Inline's "with" syntax to make it easier to write Inline::C code that works with Imager, you can call Imager functions without having to include headers or perform initialization. Imager's Inline "with" support does the following: o add the installed Imager include directory to INC o add the Imager typemap to TYPEMAPS o include the headers needed by Imager C extension modules. o declare and initialize the Imager API function table pointer o filter the supplied code to replace Imager's class names with those that Inline::C can handle. LIMITATIONS
The filtering mechanism is global, it will replace the class names even inside string constants. If you need a string matching the name of one of Imager's classes, like "Imager::Color" you will need to split it into 2 to use C's string pasting mechanism, for example: "Imager:" ":Color". AUTHOR
Tony Cook <tonyc@cpan.org> REVISION
$Revision$ SEE ALSO
Imager, Imager::ExtUtils, Imager::API, Imager::APIRef, samples/inline_replace_color.pl perl v5.14.2 2011-06-06 Imager::Inline(3pm)

Check Out this Related Man Page

Imager::Security(3pm)					User Contributed Perl Documentation				     Imager::Security(3pm)

NAME
Imager::Security - brief notes on security and image processing SYNOPSIS
# keep abreast of security updates apt-get update && apt-get upgrade yum upgrade pkgin update && pkgin upgrade # or local equivalent # limit memory use use Imager; # only images that use up to 10MB Imager->set_file_limits(bytes => 10_000_000); DESCRIPTION
There's two basic security considerations when dealing with images from an unknown source: o keeping your libraries up to date o limiting the amount of memory used to store images Keeping libraries up to date Image file format libraries such as "libpng" or "libtiff" have relatively frequent security updates, keeping your libraries up to date is basic security. If you're using user supplied fonts, you will need to keep your font libraries up to date too. Limiting memory used With compression, and especially with pointer formats like TIFF, it's possible to store very large images in a relatively small file. If you're receiving image data from an untrusted source you should limit the amount of memory that Imager can allocate for a read in image file using the "set_file_limits()" method. Imager->set_file_limits(bytes => 10_000_000); You may also want to limit the maximum width and height of images read from files: Imager->set_file_limits(width => 10_000, height => 10_000, bytes => 10_000_000); This has no effect on images created without a file: # succeeds my $image = Imager->new(xsize => 10_001, ysize => 10_001); You can reset to the defaults with: Imager->set_file_limits(reset => 1); AUTHOR
Tony Cook <tonyc@cpan.org> perl v5.14.2 2012-06-04 Imager::Security(3pm)
Man Page

7 More Discussions You Might Find Interesting

1. Programming

Inline function inside Classes

#include <iostream> using namespace std; class A { public: int Getvalue() { return i;} private: int i; }; int main() {} The above code compiles properly in g++ or in any other C++ compiler. BUT, the variable 'i' is used (in 'return i' statement) before it is... (1 Reply)
Discussion started by: deepthi.s
1 Replies

2. UNIX for Dummies Questions & Answers

filling variable with ls

hello All, Need some further help. This will make my live easier. Instead of copy and pasting I think I can automate some website building. when I do a ls from a directory I need the file names placed into a sentence. it is going about wordts like: word-AB-1234.jpg... (1 Reply)
Discussion started by: ToXiQ
1 Replies

3. Shell Programming and Scripting

Inline searc and replace inside file

Hello, I have a text file that i want to redirect into a new file , searching and replacing certain string during the opertaion. This should be done using shell script , so it should not be interactive. The script should get four parameters : source file target file source string target... (1 Reply)
Discussion started by: yoavbe
1 Replies

4. SCO

Possible hostname issue?

from the hostname command I get this: scosysv.mycompany0 when I ping scosysv.mycompany0 i get 64.158.xx.xx which fails with 100% packet loss. /etc/hosts shows 199.199.199.1 scosysv scosysv.mycompany0 scosysv.mycompany0.com when I ping the hostname value isn't the local IP 199.199.199.1... (6 Replies)
Discussion started by: bbxguy
6 Replies

5. Shell Programming and Scripting

Total Count using AWK

Hi Everybody, I have the following example file... 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1... (8 Replies)
Discussion started by: sraj142
8 Replies

6. Shell Programming and Scripting

Inline edit using sed / awk

Hi, I have file with all the lines as following format <namebindings:StringNameSpaceBinding xmi:id="StringNameSpaceBinding" name="ENV_CONFIG_PATH" nameInNameSpace="COMP/HOD/MYSTR/BACKOFFICE/ENV_CONFIG_PATH" stringToBind="test"/> I want to replace (all the lines) value of... (8 Replies)
Discussion started by: shuklaa02
8 Replies

7. Shell Programming and Scripting

Sed, Inline replacement of string with spaces

Hello, Just surfed on the web for probable answers but could not get them working. I wish to replace the string containing spaces by another phrase but below answers did not work. My string is: PAIN & GAIN I wish to convert it to: P&G I just need it working with sed with function -i ... (6 Replies)
Discussion started by: baris35
6 Replies