public void SaveImage(string cardid) { if (m_loadedImage != "") { // Save card image ImageResizer.SaveImage(CardImg.Image, "pics\\" + cardid + ".jpg", 177, 254); //Save card thumbnail ImageResizer.SaveImage(CardImg.Image, "pics\\thumbnail\\" + cardid + ".jpg", 44, 64); } }
private void LoadImageBtn_Click(object sender, EventArgs e) { m_loadedImage = ""; string imagepath = ImageResizer.OpenFileWindow("Set Image ", "", "Images|*.jpg;*.jpeg;*.png;"); if (imagepath != null) { if (File.Exists(imagepath)) { using (var stream = new FileStream(imagepath, FileMode.Open, FileAccess.Read)) { CardImg.Image = Image.FromStream(stream); } m_loadedImage = imagepath; } else { CardImg.Image = Resources.unknown; } } }