incubator-sanselan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Daems (JIRA)" <j...@apache.org>
Subject [jira] Updated: (SANSELAN-5) Can't convert PNG image to GIF image
Date Tue, 15 Jul 2008 18:19:31 GMT

     [ https://issues.apache.org/jira/browse/SANSELAN-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dirk Daems updated SANSELAN-5:
------------------------------

    Description: 
I want to transform a set of PNG images to GIF images.
 
The code I tried:

private static void convertImage(String sourceDir, String sourceFile, String targetDir){
  try{
 
   BufferedImage source = Sanselan.getBufferedImage(new File(sourceDir + File.separator +
sourceFile));
   String targetFile = sourceFile.substring(0, sourceFile.indexOf('.')) + ".gif";
   Hashtable parms = new Hashtable();
   // parms.put(SanselanConstants.PARAM_KEY_VERBOSE, Boolean.TRUE);
   Sanselan.writeImage(source, new File(targetDir + File.separator + targetFile), ImageFormat.IMAGE_FORMAT_GIF,
parms);
 
  }
  catch(Exception ex){
   ex.printStackTrace();
  }
 
 }
 
I don't get any errors but the image that's generated cannot be displayed and is way too small
(2kb).

I attached an example of a PNG file I can't seem to convert.

  was:
I want to transform a set of PNG images to GIF images.
 
The code I tried:

private static void convertImage(String sourceDir, String sourceFile, String targetDir){
  try{
 
   BufferedImage source = Sanselan.getBufferedImage(new File(sourceDir + File.separator +
sourceFile));
   String targetFile = sourceFile.substring(0, sourceFile.indexOf('.')) + ".gif";
   Hashtable parms = new Hashtable();
   // parms.put(SanselanConstants.PARAM_KEY_VERBOSE, Boolean.TRUE);
   Sanselan.writeImage(source, new File(targetDir + File.separator + targetFile), ImageFormat.IMAGE_FORMAT_GIF,
parms);
 
  }
  catch(Exception ex){
   ex.printStackTrace();
  }
 
 }
 
I don't get any errors but the image that's generated cannot be displayed and is way too small
(2kb).


> Can't convert PNG image to GIF image
> ------------------------------------
>
>                 Key: SANSELAN-5
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-5
>             Project: Sanselan
>          Issue Type: Bug
>         Environment: Windows XP SP2, Eclipse IDE, Custom Java database conversion program,
JRE 1.5.x
>            Reporter: Dirk Daems
>            Assignee: Carsten Ziegeler
>            Priority: Blocker
>         Attachments: 12118.png
>
>
> I want to transform a set of PNG images to GIF images.
>  
> The code I tried:
> private static void convertImage(String sourceDir, String sourceFile, String targetDir){
>   try{
>  
>    BufferedImage source = Sanselan.getBufferedImage(new File(sourceDir + File.separator
+ sourceFile));
>    String targetFile = sourceFile.substring(0, sourceFile.indexOf('.')) + ".gif";
>    Hashtable parms = new Hashtable();
>    // parms.put(SanselanConstants.PARAM_KEY_VERBOSE, Boolean.TRUE);
>    Sanselan.writeImage(source, new File(targetDir + File.separator + targetFile), ImageFormat.IMAGE_FORMAT_GIF,
parms);
>  
>   }
>   catch(Exception ex){
>    ex.printStackTrace();
>   }
>  
>  }
>  
> I don't get any errors but the image that's generated cannot be displayed and is way
too small (2kb).
> I attached an example of a PNG file I can't seem to convert.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message