[mapserver-dev] Perl mapscript imageObj_write error

Julien-Samuel Lacroix jlacroix at mapgears.com
Thu Jul 24 16:37:45 EDT 2008


Hi,

Anyone played with Perl imageObj_write function in MapServer 4.10? Or 
with getBytes?

I'm trying get the binary output of a imageObj into a variable, but I 
always get the following error:
TypeError in method 'imageObj_write', argument 2 of type 'FILE *'

Even with the following code:
#! /usr/bin/perl

use mapscript;
use strict;

my $map = new mapscript::mapObj("default_mapfile.map");
my $img = $map->draw();
my $fh;
open $fh, "/tmp/ttt.gif";
$img->write($fh);
close($fh);

I found the following bug, but it's not clear if it was implemented or not:
http://trac.osgeo.org/mapserver/ticket/1371

Best regards,
Julien

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the mapserver-dev mailing list