Hello members,
Greetings of the day....
I am working on a C# WinApp. I am preparing my picture album uploading and viewing app. I have two queries...
1. How to save the image with its original name?
my code line for doing so is... pbImages.Image.Save(@"D:\Images\MyAlbums\Picture.jpg");
obviously, it will save the image with name 'Picture' but the problem is when I save another image it overwrites the first image and gives the same name 'Picture' to the second image.
Is there any way to copy the name at the time of selecting the image from OpenFileDialog box and give it to the image when saved? or any other way to save pictures as P1, P2, P3... so on whichever is easier.
2.How to maintain the picture quality when retriving the image to picture box?
I use ListView to see all the saved images with help of ImageView, when i select an image from ListView to load into the PictureBox, it gets blurred. I do not know why it happens... I have checked to change the color depth but no change happned.
let me tell you one thing, I reduce the picture size according to the size of the picture box. when I see the image in normal way (i.e. in Windows Photo Viewer) it appears good but when load in picture box, it gets blurred.
Please help me .
Thanks a lot
Mayank Jani.

Amit GuptaRank #190 · 12.8K reputationPosted Apr 22, 2019, 9:33 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 11, 2019, 2:07 PM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 12, 2019, 7:36 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 12, 2019, 8:10 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 12, 2019, 8:12 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 14, 2019, 8:02 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 14, 2019, 8:40 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 16, 2019, 8:32 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 16, 2019, 9:06 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 17, 2019, 8:50 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 17, 2019, 11:24 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 18, 2019, 9:04 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 18, 2019, 12:52 PM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 19, 2019, 7:54 AM EDT
imageList1.ImageSize = new Size(100, 100);
lvThumbs.LargeImageList = this.imageList1;
return;
Int32 item = lvThumbs.SelectedIndices[0];
Image img = imageList1.Images[item];
pbImage.Image = img;
Amit GuptaRank #190 · 12.8K reputationPosted Apr 19, 2019, 8:59 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 20, 2019, 8:22 AM EDT
{
if (lvThumbs.SelectedItems.Count == 0)
return;
var index = lvThumbs.SelectedItems[0].Index;
pbImage.Image = Image.FromFile(_files[index].FullName);
}
Amit GuptaRank #190 · 12.8K reputationPosted Apr 20, 2019, 8:59 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 22, 2019, 7:50 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 22, 2019, 10:34 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 22, 2019, 9:21 PM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Apr 24, 2019, 8:08 AM EDT
Amit KumarRank #459 · 5.4K reputationPosted Apr 22, 2019, 8:26 AM EDT