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

Bitmap.Clone not working.. ( It doesn't get any simpler..)

2
I cannot clone a bitmap.. the error on the offending line says:

Cannot implicitly convert type 'object' to 'System.Drawing.Bitmap'. An explicit conversion exists (are you missing a cast?)

below is the code where is happens , the last line raises the error.

private Bitmap _backBuffer;
private Bitmap _copyBackBuffer;
protected override void OnPaint(PaintEventArgs e)
{

if (_backBuffer == null)
{
_backBuffer = new Bitmap(this.ClientSize.Width, this.ClientSize.Height);
}
_copyBackBuffer=_backBuffer.Clone();


What am I missing here..?
P.S. Casting and such does not change the error.. :(
Feb 1 '07 #1
1 2654
TG01
2
Ah I got it..
Accidently I got two conflicting using statements

using System.Drawing;
and
using System.Drawing.Drawing2D;
Feb 1 '07 #2

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

Similar topics

2
by: ekey | last post by:
Hi: I want to create Bmp by fellow code,and it good work, Bitmap bitmap1 = new Bitmap((Image)iData.GetData(DataFormats.Bitmap)) but i want to cut the part of the Bmp now . How to do it ? ...
1
by: André Borchert | last post by:
Hello, how do you select a region (area = x1,y1,x2,y2) of a bitmap and cut or copy this selection into a new bitmap ? The original could be a Bitmap object or a Image/PictureBox object....
0
by: James Dean | last post by:
Question 1:I have my full image and i only display that when the zoom rate is 1:1......i guess i will set my default display to 1:16.....is it okay to just return a thumbnail of the entire image...
1
by: RicercatoreSbadato | last post by:
Help plz, what's happen exactly when I do Bitmap.Clone() ?
2
by: active | last post by:
I find Bitmap.Save works for WMF files but Bitmap.FromFile does not. If I use FromFile on a WMF file that came with VS I get an exception. If I use it on a WMF file created with Bitmap.Save I...
2
by: Mad Scientist Jr | last post by:
I have a bitmap (32 pixels high, 8192 pixels wide) that contains 255 images, each 32 pixels wide, that I would like to chop up into individual 32x32 bitmap files. Rather than spending hours in...
2
by: John | last post by:
The following 4 lines add a border to a bitmap and save it into clipboard, however it also add a border to the bitmap on the screen. I want to create a temp copy of the bitmap and add a border to...
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...
10
by: pcnerd | last post by:
I'm a VB.NET newbie. I've created a program that plots pixels at random on the form. I have a 19" LCD monitor with a resolution set to 1280 by 1024. If you do the math, that means that there are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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
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...

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.