public static IImage createImage(Stream stream) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(stream); lwuitImage.image.SetResolution(96, 96); return lwuitImage; }
public IImage ModifyAlpha(byte alpha, int removeColor) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(image.Width, image.Height); lwuitImage.image.SetResolution(96, 96); System.Drawing.Color emptyColor = System.Drawing.Color.FromArgb(0); for (int i = 0; i < image.Width; i++) { for (int j = 0; j < image.Height; j++) { System.Drawing.Color rgb = image.GetPixel(i, j); System.Drawing.Color rgb1 = System.Drawing.Color.FromArgb(alpha, rgb.R, rgb.G, rgb.B); if ((rgb.ToArgb() & 0xffffff) == removeColor) { lwuitImage.image.SetPixel(i, j, emptyColor); } else { lwuitImage.image.SetPixel(i, j, rgb1); } } } return(lwuitImage); }
public static IImage createImage(int width, int height) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(width, height); lwuitImage.image.SetResolution(96,96); return lwuitImage; }
public override IImage CreateImage(Stream stream) { try { return(NETImage.createImage(stream)); } catch (IOException ex) { } return(null); }
public static IImage createImage(Stream stream) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(stream); lwuitImage.image.SetResolution(96, 96); return(lwuitImage); }
public static IImage createImage(int width, int height) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(width, height); lwuitImage.image.SetResolution(96, 96); return(lwuitImage); }
public static IImage createImage(byte[] bytes, int offset, int len) { //NETImage lwuitImage = new NETImage(); //lwuitImage.image = Bitmap.CreateImage(bytes, offset, len); MemoryStream memoryStream = new MemoryStream(bytes, offset, len); NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(memoryStream); lwuitImage.image.SetResolution(96, 96); return lwuitImage; }
public static IImage createImage(byte[] bytes, int offset, int len) { //NETImage lwuitImage = new NETImage(); //lwuitImage.image = Bitmap.CreateImage(bytes, offset, len); MemoryStream memoryStream = new MemoryStream(bytes, offset, len); NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(memoryStream); lwuitImage.image.SetResolution(96, 96); return(lwuitImage); }
public static IImage createImage(int[] rgb, int width, int height) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(width, height); lwuitImage.image.SetResolution(96, 96); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { lwuitImage.image.SetPixel(i, j, System.Drawing.Color.FromArgb(rgb[i * height + j])); } } return lwuitImage; }
public static IImage createImage(int[] rgb, int width, int height) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(width, height); lwuitImage.image.SetResolution(96, 96); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { lwuitImage.image.SetPixel(i, j, System.Drawing.Color.FromArgb(rgb[i * height + j])); } } return(lwuitImage); }
public IImage SubImage(int x, int y, int width, int height, bool processAlpha) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(width, height); lwuitImage.image.SetResolution(96, 96); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { int rgb = image.GetPixel(x + i, y + j).ToArgb(); lwuitImage.image.SetPixel(i, j, System.Drawing.Color.FromArgb(rgb)); } } return(lwuitImage); }
public IImage SubImage(int x, int y, int width, int height, bool processAlpha) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(width, height); lwuitImage.image.SetResolution(96, 96); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { int rgb = image.GetPixel(x + i, y + j).ToArgb(); lwuitImage.image.SetPixel(i, j, System.Drawing.Color.FromArgb(rgb)); } } return lwuitImage; }
public IImage ModifyAlpha(byte alpha, int removeColor) { NETImage lwuitImage = new NETImage(); lwuitImage.image = new Bitmap(image.Width, image.Height); lwuitImage.image.SetResolution(96, 96); System.Drawing.Color emptyColor = System.Drawing.Color.FromArgb(0); for (int i = 0; i < image.Width; i++) { for (int j = 0; j < image.Height; j++) { System.Drawing.Color rgb = image.GetPixel(i, j); System.Drawing.Color rgb1 = System.Drawing.Color.FromArgb(alpha, rgb.R, rgb.G, rgb.B); if ((rgb.ToArgb() & 0xffffff) == removeColor) { lwuitImage.image.SetPixel(i, j, emptyColor); } else { lwuitImage.image.SetPixel(i, j, rgb1); } } } return lwuitImage; }
public override IImage CreateImage(byte[] bytes, int offset, int len) { return(NETImage.createImage(bytes, offset, len)); }
public override IImage CreateImage(int[] rgb, int width, int height) { return(NETImage.createImage(rgb, width, height)); }