Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Perl
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Perl section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 13th, 2007, 08:11 AM
Registered User
 
Join Date: Feb 2007
Location: Chennai, TamilNadu, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Working with TIFF images

Hi,

†Is it possible to find whether a Tiff image is RGB or CMYK using perl?

Regards,
Freedolen
Reply With Quote
  #2 (permalink)  
Old March 13th, 2007, 10:37 PM
Registered User
 
Join Date: Feb 2007
Location: Chennai, TamilNadu, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Though i have checked with
Image::Magick;
and used
my $img = new Image::Magick;
$img->Read("Sample.tif");
my ($type) = $img->Get("type");
print $type;
It displays "TrueColor" and "Palette" for RGB and "ColorSeparation" for CMYK
Is there any specific property or method to find an image which is RGB or CMYK?

Regards,
Freedolen
Reply With Quote
  #3 (permalink)  
Old March 14th, 2007, 10:41 PM
Registered User
 
Join Date: Feb 2007
Location: Chennai, TamilNadu, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

   I have found 'colorspace' property ($rgborcmyk = $img->Get('colorspace');), which tells Grayscale pictures also as RGB.

Regards,
Freedolen

Reply With Quote
  #4 (permalink)  
Old March 16th, 2007, 10:55 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Glad you got it sorted out. here's some example usage of the Image::Magick function.
it's not that new v6!!
Code:
use Image::Magick;
$p = new Image::Magick;
$p->Read("imagefile");
$p->Set(attribute => value, ...)
($a, ...) = $p->Get("attribute", ...)
$p->routine(parameter => value, ...)
$p->Mogrify("Routine", parameter => value, ...)
$p->Write("filename");

www.crmpicco.co.uk
www.ie7.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arch and Design : Involving Tiff images navdeep General .NET 2 July 17th, 2007 05:50 AM
Php code to put&get images from mysql not working! angelbeans PHP Databases 1 September 8th, 2006 12:44 PM
Problem while handling Tiff Images singhmanpreet C# 0 June 29th, 2005 05:53 AM
Working with Images Issue Capt D PHP Databases 6 January 31st, 2005 03:49 PM
Working with images Pallav Servlets 6 September 24th, 2004 12:51 PM



All times are GMT -4. The time now is 12:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.