473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

New bitmap() is very slow

Hi folks,

I load a JPEG image, say around 300 kBytes, from disk as follows:

myBitmap = New Bitmap(openDlg.FileName)

I then make a copy of this as follows:

bmpImage = New Bitmap(myBitmap )

This 2nd call can take up to TEN SECONDS to execute. What's up with that?
Should I be doing this a different way?

Thanks,
--George

Nov 21 '05 #1
2 2572
Hi,

Try bmpImage = MyBitmap.clone

Ken
----------------------
"George Yefchak" <ge****@yefchak.com> wrote in message
news:10**************@emperor.labs.agilent.com...
Hi folks,

I load a JPEG image, say around 300 kBytes, from disk as follows:

myBitmap = New Bitmap(openDlg.FileName)

I then make a copy of this as follows:

bmpImage = New Bitmap(myBitmap )

This 2nd call can take up to TEN SECONDS to execute. What's up with that?
Should I be doing this a different way?

Thanks,
--George


Nov 21 '05 #2

"George Yefchak" <ge****@yefchak.com> wrote
I load a JPEG image, say around 300 kBytes, from disk as follows:

myBitmap = New Bitmap(openDlg.FileName)

I then make a copy of this as follows:

bmpImage = New Bitmap(myBitmap )

This 2nd call can take up to TEN SECONDS to execute. What's up with that?
Should I be doing this a different way?

How about making a hard copy?

bmpImage = New Bitmap(myBitmap.Width, myBitmap.Height)
Dim grx as graphics = graphics.FromBitmap(bmpImage)
grx.DrawImage(myBitmap, 0,0)
grx.Dispose
LFS
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gandalf | last post by:
Hi Gurus! Here is a problem with wxPython. I would like to load bitmaps and create a mask for them at once. Here is my idea: the mask colour for the bitmap should be the colour of the pixel in...
5
by: Jeroen Ceuppens | last post by:
I have the colormap (ARGB, 8bit , so every color from 0 to 255) , put it in an array (1dim) I have the pixel date (array 640x480) What is the best way to make with these array's a bitmap file?...
1
by: James Dean | last post by:
I am reading in a certain file format and it is compressed with Run Length encoding. To output to the screen i convert this to a 24bpp bitmap. The problem is when the data is decompressed its big...
1
by: James Dean | last post by:
In my program i create a 32ARGB bitmap. To actually create the bitmap seems very slow. In fairness the file size is very big. I support multiple bitmaps as well. I have to convert these bitmaps to...
7
by: chuck | last post by:
I load a bitmap using GDI+ now, I want to collect all the pixel values, (in RGB but without the A component) onto a color array, say... dim btmp1(,) as color is there a method that can help me...
0
by: Henry Padilla | last post by:
I'm writing an app that creates a bitmap of a map (land, trees, ocean). The resolution of the map is ~84x52 (it can change but will get no larger than 256x128). Since this is so small I resize...
4
by: John J. Hughes II | last post by:
The following code throws a out of memory exception, I have another function that does the same thing using the bitmap lock but its way slow. Anyone know how to fix this one? public static...
2
by: Peter Oliphant | last post by:
I want to create a new Bitmap which is a portion of an existing Bitmap. For example, if I have a Bitmap that is 100x100 in size I might want to create a new Bitmap that is equivalent to the one...
6
by: ProtossLee | last post by:
Hi, I am currently working on a project for image processing. a double matrix m1(1300X1000) need to be converted into bitmap and displayed on screen. so far I've made the following code: For i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.