Reply To: Created IMAGE

#24535
AvatarDonna111
Member
  • Total Post: 3
  • Newbie
  • ★

HI there
I have tried to create image using this code which is from google:
namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
int width = 100;
int height = 60;

REImage reImage = new REImage(width, height, ImageMode.RGB888);// Create a image with specified width, height and color mode; all pixels are set to white

REFile.SaveImageFile(reImage, “c:/reimage.bmp”, new BMPEncoder());
REFile.SaveImageFile(reImage, “c:/reimage.png”, new PNGEncoder());
REFile.SaveImageFile(reImage, “c:/reimage.jpg”, new JPGEncoder());
REFile.SaveImageFile(reImage, “c:/reimage.tif”, new TIFEncoder());
}
But it can not work.What’s wrong with this code?
Thanks a lot