r2330 - in
packages/libimage-librsvg-perl/branches/upstream/current: .
examples lib/Image t
Krzysztof Krzyzaniak
eloy at costa.debian.org
Mon Mar 13 18:31:06 UTC 2006
Author: eloy
Date: 2006-03-13 18:31:06 +0000 (Mon, 13 Mar 2006)
New Revision: 2330
Added:
packages/libimage-librsvg-perl/branches/upstream/current/Changes~
packages/libimage-librsvg-perl/branches/upstream/current/examples/test.png
Modified:
packages/libimage-librsvg-perl/branches/upstream/current/Changes
packages/libimage-librsvg-perl/branches/upstream/current/LibRSVG.xs
packages/libimage-librsvg-perl/branches/upstream/current/Makefile.PL
packages/libimage-librsvg-perl/branches/upstream/current/examples.pl
packages/libimage-librsvg-perl/branches/upstream/current/lib/Image/LibRSVG.pm
packages/libimage-librsvg-perl/branches/upstream/current/t/1.t
Log:
Load /tmp/tmp.8ES4sB/libimage-librsvg-perl-0.06 into
packages/libimage-librsvg-perl/branches/upstream/current.
Modified: packages/libimage-librsvg-perl/branches/upstream/current/Changes
===================================================================
--- packages/libimage-librsvg-perl/branches/upstream/current/Changes 2006-03-13 16:23:27 UTC (rev 2329)
+++ packages/libimage-librsvg-perl/branches/upstream/current/Changes 2006-03-13 18:31:06 UTC (rev 2330)
@@ -1,5 +1,8 @@
Revision history for Perl extension Image::LibRSVG.
+0.06 - fixed loading of gz files with new version (RT 18146)
+ - removed DEFINE from Makefile-call (old librvg installations can use 0.05)
+
0.05 - enabled new function "getBitmap" which returns the bitmap into a scalar
- added new function "isGzCompressionSupported" to check if gzipped files can be passed
- added some new tests
Added: packages/libimage-librsvg-perl/branches/upstream/current/Changes~
===================================================================
--- packages/libimage-librsvg-perl/branches/upstream/current/Changes~ 2006-03-13 16:23:27 UTC (rev 2329)
+++ packages/libimage-librsvg-perl/branches/upstream/current/Changes~ 2006-03-13 18:31:06 UTC (rev 2330)
@@ -0,0 +1,22 @@
+Revision history for Perl extension Image::LibRSVG.
+
+0.06 - fixed loading of gz files with new version
+ - removed DEFINE from Makefile-call (old librvg installations can use 0.05)
+
+0.05 - enabled new function "getBitmap" which returns the bitmap into a scalar
+ - added new function "isGzCompressionSupported" to check if gzipped files can be passed
+ - added some new tests
+
+0.04
+ - fixed typo in POD (cpan-bug-id 6187)
+ - fixed problems with detecting zlib support
+ (now default is on and can be turned off by perl Makefile.PL-Param
+ as shown in read me)
+0.03
+ - added loading from string
+
+0.02
+ - corrected wrong Modulenames in examples in POD
+ - corrected typo in loadImage dimesion => dimension
+0.01
+ - added support 4 librsvg 2
Modified: packages/libimage-librsvg-perl/branches/upstream/current/LibRSVG.xs
===================================================================
--- packages/libimage-librsvg-perl/branches/upstream/current/LibRSVG.xs 2006-03-13 16:23:27 UTC (rev 2329)
+++ packages/libimage-librsvg-perl/branches/upstream/current/LibRSVG.xs 2006-03-13 18:31:06 UTC (rev 2330)
@@ -27,10 +27,6 @@
#include "librsvg/rsvg.h"
-#if HAVE_SVGZ
-#include "librsvg/rsvg-gz.h"
-#endif
-
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -141,90 +137,16 @@
static GdkPixbuf *
rsvg_pixbuf_from_file_with_size_data (const gchar * file_name, struct RsvgSizeCallbackData * data, GError ** error)
{
-#if HAVE_SVGZ
- RsvgHandle * handle;
- guchar chars[SVG_BUFFER_SIZE];
- GdkPixbuf *retval;
- gint result;
- FILE *f = fopen (file_name, "rb");
-
- if (!f) {
- g_set_error (error, G_FILE_ERROR,
- g_file_error_from_errno (errno),
- g_strerror (errno));
- return NULL;
- }
-
- result = fread (chars, 1, SVG_BUFFER_SIZE, f);
-
- if (result == 0) {
- g_set_error (error, G_FILE_ERROR,
- g_file_error_from_errno (errno),
- g_strerror (errno));
- fclose (f);
- return NULL;
- }
-
- /* test for GZ marker */
- if ((result >= 2) && (chars[0] == (guchar)0x1f) && (chars[1] == (guchar)0x8b))
- {
- handle = rsvg_handle_new_gz ();
- }
- else
- {
- handle = rsvg_handle_new ();
- }
-
- rsvg_handle_set_size_callback (handle, rsvg_size_callback, data, NULL);
- rsvg_handle_write (handle, chars, result, error);
-
- while ((result = fread (chars, 1, SVG_BUFFER_SIZE, f)) > 0)
- {
- rsvg_handle_write (handle, chars, result, error);
- }
-
- rsvg_handle_close (handle, error);
- retval = rsvg_handle_get_pixbuf (handle);
-
- fclose (f);
- rsvg_handle_free (handle);
- return retval;
-#else
RsvgHandle * handle = rsvg_handle_new ();
GdkPixbuf * retval = rsvg_pixbuf_from_file_with_size_data_ex (handle, file_name, data, error);
rsvg_handle_free (handle);
return retval;
-#endif
}
static GdkPixbuf *
rsvg_pixbuf_from_chars_with_size_data (const guchar * svg, struct RsvgSizeCallbackData * data, GError ** error)
{
-#if HAVE_SVGZ
- RsvgHandle * handle;
- GdkPixbuf *retval;
- gint result;
-
-
- /* test for GZ marker */
- if ( (svg[0] == (guchar)0x1f) && (svg[1] == (guchar)0x8b) )
- {
- handle = rsvg_handle_new_gz ();
- }
- else
- {
- handle = rsvg_handle_new ();
- }
-
- rsvg_handle_set_size_callback (handle, rsvg_size_callback, data, NULL);
- rsvg_handle_write (handle, svg, strlen( svg ), error);
- rsvg_handle_close (handle, error);
- retval = rsvg_handle_get_pixbuf (handle);
- rsvg_handle_free (handle);
-
- return retval;
-#else
RsvgHandle * handle = rsvg_handle_new ();
rsvg_handle_set_size_callback (handle, rsvg_size_callback, data, NULL);
rsvg_handle_write (handle, svg, strlen( svg ), error);
@@ -233,7 +155,6 @@
rsvg_handle_free (handle);
return retval;
-#endif
}
@@ -531,7 +452,6 @@
OUTPUT:
RETVAL
-#if HAVE_SVGZ
static bool
SVGLibRSVG::isGzCompressionSupported()
CODE:
@@ -539,17 +459,6 @@
OUTPUT:
RETVAL
-#else
-static bool
-SVGLibRSVG::isGzCompressionSupported()
- CODE:
- RETVAL = 0;
- OUTPUT:
- RETVAL
-
-#endif
-
-
## -------------------------------------------------------
## CONVERT FUNCTIONS
@@ -1082,4 +991,4 @@
OUTPUT:
RETVAL
-#endif
\ No newline at end of file
+#endif
Modified: packages/libimage-librsvg-perl/branches/upstream/current/Makefile.PL
===================================================================
--- packages/libimage-librsvg-perl/branches/upstream/current/Makefile.PL 2006-03-13 16:23:27 UTC (rev 2329)
+++ packages/libimage-librsvg-perl/branches/upstream/current/Makefile.PL 2006-03-13 18:31:06 UTC (rev 2330)
@@ -4,7 +4,6 @@
$config{INC} = ' ' . `pkg-config --cflags librsvg-2.0`;
$config{LIBS} = ' ' . `pkg-config --libs-only-l librsvg-2.0`;
-$config{DEFINE} = ' -DHAVE_SVGZ=1';
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
Added: packages/libimage-librsvg-perl/branches/upstream/current/examples/test.png
===================================================================
(Binary files differ)
Property changes on: packages/libimage-librsvg-perl/branches/upstream/current/examples/test.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Property changes on: packages/libimage-librsvg-perl/branches/upstream/current/examples.pl
___________________________________________________________________
Name: svn:executable
-
+ *
Modified: packages/libimage-librsvg-perl/branches/upstream/current/lib/Image/LibRSVG.pm
===================================================================
--- packages/libimage-librsvg-perl/branches/upstream/current/lib/Image/LibRSVG.pm 2006-03-13 16:23:27 UTC (rev 2329)
+++ packages/libimage-librsvg-perl/branches/upstream/current/lib/Image/LibRSVG.pm 2006-03-13 18:31:06 UTC (rev 2330)
@@ -99,7 +99,7 @@
=head1 NAME
-Image::SVGLibRSVG - Perl extension for librsvg
+Image::LibRSVG - Perl extension for librsvg
=head1 SYNOPSIS
@@ -179,10 +179,6 @@
returns true if you can store your image in this format else false
-=item * B<bool> isGzCompressionSupported()
-
-return true if zlib-Support is enabled
-
=back
=head3 member methods
Modified: packages/libimage-librsvg-perl/branches/upstream/current/t/1.t
===================================================================
--- packages/libimage-librsvg-perl/branches/upstream/current/t/1.t 2006-03-13 16:23:27 UTC (rev 2329)
+++ packages/libimage-librsvg-perl/branches/upstream/current/t/1.t 2006-03-13 18:31:06 UTC (rev 2330)
@@ -5,7 +5,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
-use Test::More tests => 28;
+use Test::More tests => 27;
BEGIN { use_ok('Image::LibRSVG') };
#########################
@@ -57,9 +57,6 @@
ok( ! $rsvg->loadImage( "examples/artscontrol.sv" ) );
ok( ! $rsvg->saveAs( "examples/test.png" ) );
-## check if compression is supported
-ok( Image::LibRSVG->isGzCompressionSupported() == 1 );
-
## if we use z-lib let's give it a try
if( Image::LibRSVG->isGzCompressionSupported() ) {
ok( $rsvg->loadImage( "examples/artscontrol.svg.gz" ) );
@@ -72,4 +69,4 @@
## formats
ok( ref( Image::LibRSVG->getKnownFormats() ) eq "ARRAY" );
ok( ref( Image::LibRSVG->getSupportedFormats() ) eq "ARRAY" );
-ok( Image::LibRSVG->isFormatSupported("png") );
\ No newline at end of file
+ok( Image::LibRSVG->isFormatSupported("png") );
More information about the Pkg-perl-cvs-commits
mailing list