473,386 Members | 1,799 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,386 software developers and data experts.

C# / *.NET: Resize Bitmap

115 100+
I have a small program that resizes a bitmap according to mouse location. (see me talking to myself in this forum: http://bytes.com/forum/thread795956.html)

So every time the mouse moves it resizes the bitmap.

Any ideas on what would be the fastest way to resize a bitmap? (Im not looking for quality, just speed)
May 13 '08 #1
4 7438
Plater
7,872 Expert 4TB
The Image(or is just Bitmap) object has a like MakeThumbnail function that just takes in a new size and returns a resized version of the image.
May 13 '08 #2
ShadowLocke
115 100+
Are you refering to "Image.GetThumbnailImage"?

I have just tried this, it did not appear to speed things up. Although, Im starting to think the resize may not be whats causing my slow down.
May 13 '08 #3
Plater
7,872 Expert 4TB
What if, you take a Picturebox control and set the background image property to your image. Then set the (can't think of it's name) property to "Stretch" (as opposed to "center" or etc)
Then change the actual size of the picturebox control with the mouse, maybe that will work faster?
May 14 '08 #4
ShadowLocke
115 100+
Actually I narrowed down my problem to "Graphics.DrawIcon()" I was thinking the resize was taking up the time, but after changing it up and using "Graphics.DrawImage()" instead it drew a great deal faster.

This came with flicker...double buffer ftw.
May 14 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: obj | last post by:
Dear all: My english is poor.forgive me. i use GDI+ class in my MFC program.I want to do resize the Bitmap.But I have a importance point of time of execution of Resize Bitmap. I use c# to...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
2
by: pmclinn | last post by:
I import a bitmap into a .net. The bitmap is made up of black and white pixels. Is there a way to test a single point on the bitmap and discover if it is in fact black or write? I basically want...
1
by: Rich | last post by:
Hello, I developed an application for a user who uses a screen resolution of 800x600. My screen resolution is 1680x1050. In haste, I shrunk all the fonts to 6.75 so that the app (vb2005) would...
0
by: Duracel | last post by:
Hi, I've got a routine that fetches a bitmap from a COM server and converts it into a .NET format bitmap. The original DIB surface is 24 bit. When blitting this bitmap to a window, the speed...
8
by: Gabriele | last post by:
I'm studying differences between those two architecture in order to choose a setup to develop a completely new application. I'm a programmer with some experience on C++ and PHP and i have basic...
2
by: =?Utf-8?B?Sm9uIFBhcnJ5?= | last post by:
Hi, I've got a Picturebox, into which I am putting a frame bitmap from a video camera. The camera bitmap is larger than the picturebox, which has SizeMode set to "Zoom" which causes the bitmap...
3
shek124
by: shek124 | last post by:
hai I want to resize the imaxe size from 600 px to 800 px at runtime in Asp.Net. wat can i do. im using the vbcode
2
by: mdavidjohnson | last post by:
I'm trying to learn how to modify Bitmaps programatically. As a first attempt, I'm trying to simply create a blank bitmap, programatically change it to all red, and display it in a pictureBox. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.