RE: Prima beginner issues

From: Gira, Jishnu <Jishnu.Gira_at_delphi.com>
Date: Mon, 17 Sep 2007 23:37:49 +0530
To: "Marco Masetti" <marco.masetti_at_softeco.it>

Hi,

I feel I have some image library issues even now.
I have installed
1. Prima 1.22
2. Prima-prigraph-win32-1.01 from CPAN.
 Hope this is enough for having atleast gif library on windows.

3. I have Windows xp
4. I have Visual studio 6.0

The code below throws me the error ;"Error Saving: No appropriate codec
found"

  use Prima qw(Application);

   # create a new image from scratch
   my $i = Prima::Image-> new(
      width => 32,
      height => 32,
      type => im::BW, # same as im::bpp1 | im::GrayScale
   );

   # draw something
   $i-> begin_paint;
   $i-> color( cl::White);
   $i-> ellipse( 5, 5, 10, 10);
   $i-> end_paint;

   # mangle
   $i-> size( 64, 64);

   # file operations
   $i-> save('paint.gif') or die "Error saving:$@\n";
   $i-> load('paint.gif') or die "Error loading:$@\n";

I know the easiest way is to switch to Linux. But I have to use Windows
now.

Please show me some way out.

Cheers,
Jis

-----Original Message-----
From: owner-prima_at_prima.eu.org [mailto:owner-prima_at_prima.eu.org] On
Behalf Of Marco Masetti
Sent: Monday, September 17, 2007 1:27 PM
To: Gira, Jishnu
Cc: prima_at_prima.eu.org
Subject: Re: Prima beginner issues

Hi Gira,

Gira, Jishnu wrote:
>
> Hi,
>
> This still create problems.
>
> Matrix.pl in the examples section work fine for me. The example
> actually loads the gif file. But the code below simply doesn't load at

> all.
>
> It gives me an error "No such file or directory".
>
> Yes, I am still using windows.
>
> #!/usr/bin/perl
>
> use strict;
>
> use Prima;
>
> use Prima::Application;
>
> my $x = Prima::Image-> create;
>
> die "$@" unless $x-> load( 'matrix.gif');
>
First (this will not fix the problem, but is an issue anyhow): if you
are running on windows delete the shebang line or fix it to point to
your perl interpreter.

Then, on my environment (linux) the snippet runs smoothly exiting doing
nothing, I get the error only if the image is not in the current path:
are you really sure about this ? Try with the absolute image path.

Cheers,
M.
>
> Cheers,
>
> Jis
>
>
------------------------------------------------------------------------
>
> *From:* Earle Bishop [mailto:earle.bishop_at_mechaps.com]
> *Sent:* Friday, September 14, 2007 5:58 PM
> *To:* Gira, Jishnu
> *Cc:* prima_at_prima.eu.org
> *Subject:* Re: Prima beginner issues
>
> I have had some trouble getting the default code to work, too. I do
> not think the pakage was released with the images used in the slide
> presentation.
>
> I note you are runnign this code on a windows machine. I highly
> recommend you get ahold of a linux box, as there are not too many
> people working in wondows on perl. Most of your image libraries come
> default, or are installed with Prima.
>
> Hope that helps. Once you have your problem fixed, post it back to the

> list.
>
> Earle
>
> On 9/14/07, *Gira, Jishnu* <Jishnu.Gira_at_delphi.com
> <mailto:Jishnu.Gira_at_delphi.com>> wrote:
>
>
> Hi,
>
> I started learning Prima today. I typed the code
>
> use Prima;
> use IPA;
> use IPA::Local;
> use IPA::Point;
> use IPA::Global;
> use IPA::Morphology;
> my $i = Prima::Image-> load('C:\\Program Files\\Perl
> Express\\Scripts\\prima\\input.gif');
> die "Cannot load:$@\n" unless $i;
>
> This give me back the erro: cannot load . No appropriate codec found.
>
> I gues it is because I don't have gif image library.
> Where do I get it and where to put it?
>
> Pls reply,
> Jis
>
>
************************************************************************
****************
>
>
> Note: If the reader of this message is not the intended recipient, or
> an employee or agent responsible for delivering this message to the
> intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> If you have received this communication in error, please notify us
> immediately by replying to the message and deleting it from your
> computer. Thank you.
>
>
************************************************************************
****************
>
>
************************************************************************
****************
>
> Note: If the reader of this message is not the intended recipient, or
> an employee or agent responsible for delivering this message to the
> intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> If you have received this communication in error, please notify us
> immediately by replying to the message and deleting it from your
> computer. Thank you.
>
>
************************************************************************
****************
>

-- 
--------------------------------------------------------------------
Ing. Marco Masetti
Project Manager - Research & Innovation
Softeco Sismat S.P.A.		
Via De Marini, 1 - WTC Tower
Tel: (+39) 010 6026.333		    http://www.softeco.it
Fax: (+39) 010 6026.350		    mailto://marco.masetti@softeco.it
---------------------------------------------------------------------
****************************************************************************************
Note:  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. 
****************************************************************************************
Received on Mon 17 Sep 2007 - 20:13:13 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET