inkedgfx
Well-known member
I have 1 picturebox for the source image to be converted to an icon...then I have 3 different pictureboxes with 3 different sizes a convert button , once clicked the source image in picturebox1 is resized to the 3 different size pictureboxes then I have a save dialog ...my question is how do i save all 3 with 1 save file dialog. I also want to add the size of the different icons to the file name before the extention.
example:
filename is test.ico
I want to add _32x32 between "test" and ".ico" i have this code
dim savedlg as new savefiledialog
dim sourceimage1 as image = Picturebox4.image
dim sourceimage2 as image = Picturebox3.image
dim sourceimage3 as image = Picturebox2.image
savedlg.filter = "Save Icon (*.ico) |*.ico"
savedlg.title = "Save Icon As"
if savedlg.showdialog() = dialogresult.ok then
dim EXT = system.io.path.getextention(savedlg.filename)
dim FILENAME = system.io.path.getfilenamewithoutextention(savedlg.filename)
sourceimage1.save(savedlg.filename, system.drawing.imaging.imageformat.icon)
sourceimage2.save(savedlg.filename, system.drawing.imaging.imageformat.icon)
sourceimage3.save(savedlg.filename, system.drawing.imaging.imageformat.icon)
end if
this code saves 1 icon , the last one......I ned to save all 3 at different sizes with the size added to the filename
I hade this line sourceimage1.save(FILENAME & "_32x32" & EXT, system.drawing.imaging.imageformat.icon)
but this didnt save anything but a messagebox would give the correct filename with "_32x32" added.
not sure what to do here.
any help will be appreciated
InkedGFX
example:
filename is test.ico
I want to add _32x32 between "test" and ".ico" i have this code
dim savedlg as new savefiledialog
dim sourceimage1 as image = Picturebox4.image
dim sourceimage2 as image = Picturebox3.image
dim sourceimage3 as image = Picturebox2.image
savedlg.filter = "Save Icon (*.ico) |*.ico"
savedlg.title = "Save Icon As"
if savedlg.showdialog() = dialogresult.ok then
dim EXT = system.io.path.getextention(savedlg.filename)
dim FILENAME = system.io.path.getfilenamewithoutextention(savedlg.filename)
sourceimage1.save(savedlg.filename, system.drawing.imaging.imageformat.icon)
sourceimage2.save(savedlg.filename, system.drawing.imaging.imageformat.icon)
sourceimage3.save(savedlg.filename, system.drawing.imaging.imageformat.icon)
end if
this code saves 1 icon , the last one......I ned to save all 3 at different sizes with the size added to the filename
I hade this line sourceimage1.save(FILENAME & "_32x32" & EXT, system.drawing.imaging.imageformat.icon)
but this didnt save anything but a messagebox would give the correct filename with "_32x32" added.
not sure what to do here.
any help will be appreciated
InkedGFX