[gimp-perl] Convert to indexed if GIF and export_image doesn't do.
- From: Ed J <edj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-perl] Convert to indexed if GIF and export_image doesn't do.
- Date: Sun, 25 May 2014 15:11:38 +0000 (UTC)
commit 16dee60bb9efce296deab88c06bf40e054a313dd
Author: Ed J <edj src gnome org>
Date: Sun May 25 16:11:13 2014 +0100
Convert to indexed if GIF and export_image doesn't do.
examples/dataurl | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/examples/dataurl b/examples/dataurl
index 4c62aae..8fe332b 100755
--- a/examples/dataurl
+++ b/examples/dataurl
@@ -34,6 +34,15 @@ podregister {
my $new_image=$image, my $new_drawable=$drawable, "DATAURL", $flags,
);
return if $export == EXPORT_CANCEL;
+ if (
+ $export == EXPORT_IGNORE and
+ !($flags & EXPORT_CAN_HANDLE_RGB) and
+ !$new_drawable->is_indexed
+ ) {
+ $new_image = $image->duplicate;
+ $new_image->convert_indexed(0, 0, 256, 1, 1, '');
+ $new_drawable = $new_image->get_active_layer;
+ }
my ($w,$h) = ($new_drawable->width, $new_drawable->height);
my $tmp = Gimp->temp_name(".img~");
my $fh = io($filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]