From 5b0d044f2a06c225b62a47cb1f6494553e4b4c58 Mon Sep 17 00:00:00 2001 From: Arnar Mar Hrafnkelsson Date: Thu, 14 Jun 2001 01:22:11 +0000 Subject: [PATCH] Misc fixes. --- Imager.pm | 2 +- STATUS | 2 +- gif.c | 16 ++++------------ lib/Imager/Font.pm | 4 ++-- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Imager.pm b/Imager.pm index f92d79a5..55710bca 100644 --- a/Imager.pm +++ b/Imager.pm @@ -152,7 +152,7 @@ BEGIN { require Exporter; require DynaLoader; - $VERSION = '0.38'; + $VERSION = '0.39pre1'; @ISA = qw(Exporter DynaLoader); bootstrap Imager $VERSION; } diff --git a/STATUS b/STATUS index bc531887..0b87e04d 100644 --- a/STATUS +++ b/STATUS @@ -30,7 +30,7 @@ quant.c # comments, lots of changing code Iolayer todo list: Format Read/Write gif: O O -jpeg: X O +jpeg: X X png: X X raw: X X tiff: X X diff --git a/gif.c b/gif.c index 22ca044b..8a142263 100644 --- a/gif.c +++ b/gif.c @@ -1,6 +1,8 @@ #include "image.h" #include +/* XXX: Reading still needs to support reading all those gif properties */ + /* =head1 NAME @@ -96,14 +98,7 @@ my_gif_inputfunc(GifFileType* gft, GifByteType *buf,int length) { #endif -/* - This file needs a complete rewrite - This file needs a complete rewrite - - Maybe not anymore, though reading still needs to support reading - all those gif properties. -*/ /* Make some variables global, so we could access them faster: */ @@ -111,7 +106,6 @@ static int InterlacedOffset[] = { 0, 4, 2, 1 }, /* The way Interlaced image should. */ InterlacedJumps[] = { 8, 8, 4, 2 }; /* be read - offsets and jumps... */ -/* static ColorMapObject *ColorMap; */ static @@ -181,8 +175,7 @@ i_readgif_low(GifFileType *GifFile, int **colour_table, int *colours) { Size = GifFile->SWidth * sizeof(GifPixelType); - if ((GifRow = (GifRowType) mymalloc(Size)) == NULL) - m_fatal(0,"Failed to allocate memory required, aborted."); /* First row. */ + GifRow = (GifRowType) mymalloc(Size); for (i = 0; i < GifFile->SWidth; i++) GifRow[i] = GifFile->SBackGroundColor; @@ -394,8 +387,7 @@ Returns non-zero on success. */ undef_int -i_writegif(i_img *im, int fd, int max_colors, int pixdev, int fixedlen, i_color fixed[]) -{ +i_writegif(i_img *im, int fd, int max_colors, int pixdev, int fixedlen, i_color fixed[]) { i_color colors[256]; i_quantize quant; i_gif_opts opts; diff --git a/lib/Imager/Font.pm b/lib/Imager/Font.pm index fab3e474..30bd889e 100644 --- a/lib/Imager/Font.pm +++ b/lib/Imager/Font.pm @@ -165,7 +165,7 @@ Imager::Font - Font handling for Imager. x => 15, y => 40, size => 40, - color => $red + color => $red, aa => 1); # Documentation in Imager.pm @@ -264,7 +264,7 @@ This is a method of the Imager class but because it's described in here since it belongs to the font routines. Example: $img=Imager->new(); - $img=read(file=>"test.jpg"); + $img->read(file=>"test.jpg"); $img->string(font=>$t1font, text=>"Model-XYZ", x=>0, -- 2.39.5