Re: output to BMP possible?
Jorg Heymans <[email protected]> Wed, 19 Nov 2003 16:42:39 +0100
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <[email protected]> |
yup that did it thanks :)
Because i'm using this from within cocoon, i like the fact that this lib
is using avalon, it matches nicely :)
Another thing:
Is it possible to pass in a Document object to get the configuration?
So instead of
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration cfg = builder.buildFromFile(new File("barcode-cfg.xml"));
something like
DOMConfigurationbuilder builder = new DOMConfigurationbuilder();
Configuration cfg = builder.buildFromDocument(document);
Alternatively SAX events would be OK as well (to be used in cocoon
generator or transformer=
Any thoughts ?
Jorg
Jeremias Maerki wrote:
> Hmm, the documentation is probably a bit unclear. You need to download
> the "JavaTM Advanced Imaging Image I/O API 1.0" which is the second part
> of the JAI package. You can download it here:
> http://java.sun.com/products/java-media/jai/downloads/download-iio.html
>
> The jar to put into the classpath is called: jai_imageio.jar
>
> This jar contains the ImageIO-compatible codecs that plug right into JDK
> 1.4's ImageIO API.
>
> I hope this helps. I will update the documentation.
>
> On 19.11.2003 15:45:08 Jorg Heymans wrote:
>
>>I can't get below code to work even though i installed JAI and added the
>>jars to my classpath. The docs state that BMP output should be possible
>>with jai and jdk 1.4.1 (http://krysalis.org/barcode/output-formats.html)
>>
>>BitmapCanvasProvider provider =
>> new BitmapCanvasProvider(
>> out,
>> "image/bmp",
>> 100,
>> BufferedImage.TYPE_BYTE_BINARY,
>> false);
>>
>>Variations on the image/bmp like image/x-bmp also did not work.
>>
>>java.lang.UnsupportedOperationException: No BitmapEncoder available for
>>image/bmp
>> at
>>org.krysalis.barcode.output.bitmap.BitmapEncoderRegistry.getInstance(BitmapEncoderRegistry.java:185)
>> at
>>org.krysalis.barcode.output.bitmap.BitmapCanvasProvider.finish(BitmapCanvasProvider.java:120)
>>
>>Iterating on the mimetypes of BitmapEncoderRegistry gives only 3
>>outputformats
>>
>>image/png
>>image/jpeg
>>image/x-png
>
>
> Jeremias Maerki
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> krysalis-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/krysalis-users
>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/