incubator-sanselan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Daems" <dirk.da...@gmail.com>
Subject Re: transform png to gif
Date Tue, 15 Jul 2008 18:20:37 GMT
Hi,
I created a JIRA issue and uploaded a PNG example.

Kind regards,
Dirk Daems
On Tue, Jul 15, 2008 at 6:51 PM, Craig L Russell <Craig.Russell@sun.com>
wrote:

> It might be easier to create a JIRA issue and attach the images to the
> issue.
> You can choose *not* to contribute the image (e.g. you might not have
> rights to the images) by clicking the appropriate box on the JIRA.
>
> Craig
>
>  On Jul 15, 2008, at 9:47 AM, Dirk Daems wrote:
>
>  Hi,
> two messages seem to make the mail message too large.
> Here's one instead.
>
> Kind regards,
> Dirk Daems
> On Tue, Jul 15, 2008 at 6:14 PM, Charles Matthew Chen <
> charlesmchen@gmail.com> wrote:
>
>> Hi Dirk,
>>
>>   Can you please attach one of the PNGs in question?  I think this
>> mailing list posts attachments on the web. If you're worried about
>> privacy or intellectual property rights to the image, please just
>> email it to me at: charlesmchen@gmail.com.
>>
>> Thanks,
>>   Charles.
>>
>>
>>
>> On Tue, Jul 15, 2008 at 5:53 PM, Dirk Daems <dirk.daems@gmail.com> wrote:
>> > Hi,
>> > 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). What could I be doing wrong?
>> >
>> > Thanks in advance!
>> >
>> > Kind regards,
>> > Dirk Daems
>> >
>>
>
>
>   Craig L Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com <Craig.Russell@sun.com>
>
> P.S. A good JDO? O, Gasp!
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message