-
Sep 26th, 2008, 02:43 PM
#1
Thread Starter
New Member
convert jpg to bmp in memory
ok i tried searching the internet, but the only examples i can find of doing this.. involve saving the bmp to the hard drive first, which i dont wanna do
using the system.drawing namespace, some of the functions will only work correctly using a bitmap... but just for future reference, i dont wanna save them as bitmaps since they take up alot more space
so im trying to find a way to convert the jpg to bmp while in memory without saving it first.. any help would be appreciated..
-
Sep 26th, 2008, 04:19 PM
#2
Lively Member
Re: convert jpg to bmp in memory
etac,
You should be able to save the jpg image to a memory stream as a bmp, and then load it from the memory stream:
Code:
Dim myJpgImage As Image = Image.FromFile("Abstract3.jpg")
Dim myBmpImage As Image
Dim ms As New System.IO.MemoryStream
myJpgImage.Save(ms, ImageFormat.Bmp)
myBmpImage = Image.FromStream(ms)
Kerry Moorman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|