Re: [Ikvm-developers] Converting .NET Bitmap to Java BufferedImage
Brought to you by:
jfrijters
|
From: Volker B. <vol...@go...> - 2009-04-25 05:36:39
|
The interface ikvm.awt.IkvmToolkit is relative new. You need version 0.40. It is in SwingAwt.dll
Volker
> -----Ursprungliche Nachricht-----
> Von: AngelSL [mailto:hwt...@gm...]
> Gesendet: Samstag, 25. April 2009 06:21
> An: ikv...@li...
> Betreff: Re: [Ikvm-developers] Converting .NET Bitmap to Java
> BufferedImage
>
>
> That class/method doesn't exist. However, I have solved the
> problem by using
> a pixel-by-pixel copy:
> (This is C#)
> private static BufferedImage getBIFB(Bitmap c)
> {
>
> java.awt.image.BufferedImage bi = new
> BufferedImage(c.Width,
> c.Height, java.awt.image.BufferedImage.TYPE_INT_ARGB);
> for (int a = 0; a < c.Width; a++ )
> {
> for (int b = 0; b < c.Height; b++)
> {
> bi.setRGB(a, b, c.GetPixel(a, b).ToArgb());
> }
> }
> return bi;
> }
>
>
>
> Volker Berlin wrote:
> >
> > Hi,
> >
> > You can cast the default toolkit to ikvm.awt.IkvmToolkit
> and then call
> > public java.awt.Graphics2D createGraphics(cli.System.Drawing.Bitmap
> > bitmap);
> >
> > Volker
> >
> >
> >> -----Ursprungliche Nachricht-----
> >> Von: AngelSL [mailto:hwt...@gm...]
> >> Gesendet: Dienstag, 14. April 2009 16:24
> >> An: ikv...@li...
> >> Betreff: [Ikvm-developers] Converting .NET Bitmap to Java
> >> BufferedImage
> >>
> >>
> >> I'm trying to use a java library to encode animatedGIF/APNG.
> >> (.NET doesn't
> >> have any).
> >>
> >> However, I can't find a way to convert them to a BufferedImage (or
> >> Raster/Image works too).
> >>
> >> Does anyone know how I should do this?
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Converting-.NET-Bitmap-to-Java-BufferedI
> >> mage-tp23040428p23040428.html
> >> Sent from the IKVM .NET - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> --------------------------------------------------------------
> >> ----------------
> >> This SF.net email is sponsored by:
> >> High Quality Requirements in a Collaborative Environment.
> >> Download a free trial of Rational Requirements Composer Now!
> >> http://p.sf.net/sfu/www-ibm-com
> >> _______________________________________________
> >> Ikvm-developers mailing list
> >> Ikv...@li...
> >> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
> >>
> >
> >
> >
> --------------------------------------------------------------
> ----------------
> > Stay on top of everything new and different, both inside and
> > around Java (TM) technology - register by April 22, and save
> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> > 300 plus technical and hands-on sessions. Register today.
> > Use priority code J9JMT32. http://p.sf.net/sfu/p
> > _______________________________________________
> > Ikvm-developers mailing list
> > Ikv...@li...
> > https://lists.sourceforge.net/lists/listinfo/ikvm-developers
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Converting-.NET-Bitmap-to-Java-BufferedI
mage-tp23040428p23228361.html
> Sent from the IKVM .NET - Dev mailing list archive at Nabble.com.
>
>
> --------------------------------------------------------------
> ----------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty-free distribution of the report engine for
> externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Ikvm-developers mailing list
> Ikv...@li...
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>
|