473,548 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image.FromFile

Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing. Image = System.Drawing. Image.FromFile( "NC.jpg")
----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?
Nov 19 '05 #1
8 4165
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:A1******** *************** ***********@mic rosoft.com...
Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing. Image = System.Drawing. Image.FromFile( "NC.jpg") ----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?

Nov 19 '05 #2
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx
file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:A1******** *************** ***********@mic rosoft.com...
Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing. Image =

System.Drawing. Image.FromFile( "NC.jpg")
----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?


Nov 19 '05 #3
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:57******** *************** ***********@mic rosoft.com...
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx
file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:A1******** *************** ***********@mic rosoft.com...
Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing. Image =

System.Drawing. Image.FromFile( "NC.jpg")
----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?


Nov 19 '05 #4
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and i
really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:57******** *************** ***********@mic rosoft.com...
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx
file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:A1******** *************** ***********@mic rosoft.com...
> Hi All,
>
> I am trying to do a simple thing.
> -----------------------------
> Dim NCImage As System.Drawing. Image =
System.Drawing. Image.FromFile( "NC.jpg")
> ----------------------------
> I have the image NC.jpg and its a valid image but the error i get is
> FileNotFound. Can u plez tell me whats wrong?


Nov 19 '05 #5
try specifying the full path of the image like c:\inetpub\wwwr oot\...

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:1E******** *************** ***********@mic rosoft.com...
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and i really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:57******** *************** ***********@mic rosoft.com...
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:

> Is the image in the same directory with the dll for the assembly? That's > where you call is looking for it.
>
> Eliyahu
>
> "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> news:A1******** *************** ***********@mic rosoft.com...
> > Hi All,
> >
> > I am trying to do a simple thing.
> > -----------------------------
> > Dim NCImage As System.Drawing. Image =
> System.Drawing. Image.FromFile( "NC.jpg")
> > ----------------------------
> > I have the image NC.jpg and its a valid image but the error i get is > > FileNotFound. Can u plez tell me whats wrong?
>
>
>


Nov 19 '05 #6
it does not work...The problem remains

"Eliyahu Goldin" wrote:
try specifying the full path of the image like c:\inetpub\wwwr oot\...

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:1E******** *************** ***********@mic rosoft.com...
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and

i
really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:57******** *************** ***********@mic rosoft.com...
> hello Eliyahu,
>
> Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx > file. But still i get file not found.
>
> please help.
>
> thanks,
> bsmalik
>
> "Eliyahu Goldin" wrote:
>
> > Is the image in the same directory with the dll for the assembly? That's > > where you call is looking for it.
> >
> > Eliyahu
> >
> > "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> > news:A1******** *************** ***********@mic rosoft.com...
> > > Hi All,
> > >
> > > I am trying to do a simple thing.
> > > -----------------------------
> > > Dim NCImage As System.Drawing. Image =
> > System.Drawing. Image.FromFile( "NC.jpg")
> > > ----------------------------
> > > I have the image NC.jpg and its a valid image but the error i get is > > > FileNotFound. Can u plez tell me whats wrong?
> >
> >
> >


Nov 19 '05 #7
Please help!!!

"bsmalik" wrote:
it does not work...The problem remains

"Eliyahu Goldin" wrote:
try specifying the full path of the image like c:\inetpub\wwwr oot\...

Eliyahu

"bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
news:1E******** *************** ***********@mic rosoft.com...
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and

i
really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:

> That's why you can't find it.The dll is in the bin directory. Either use
> file path, or thing about another way of getting the image.
>
> Eliyahu
>
> "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> news:57******** *************** ***********@mic rosoft.com...
> > hello Eliyahu,
> >
> > Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my

aspx
> > file. But still i get file not found.
> >
> > please help.
> >
> > thanks,
> > bsmalik
> >
> > "Eliyahu Goldin" wrote:
> >
> > > Is the image in the same directory with the dll for the assembly?

That's
> > > where you call is looking for it.
> > >
> > > Eliyahu
> > >
> > > "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> > > news:A1******** *************** ***********@mic rosoft.com...
> > > > Hi All,
> > > >
> > > > I am trying to do a simple thing.
> > > > -----------------------------
> > > > Dim NCImage As System.Drawing. Image =
> > > System.Drawing. Image.FromFile( "NC.jpg")
> > > > ----------------------------
> > > > I have the image NC.jpg and its a valid image but the error i get

is
> > > > FileNotFound. Can u plez tell me whats wrong?
> > >
> > >
> > >
>
>
>


Nov 19 '05 #8
Show us the code you have in place now, perhaps it will give us some
info...

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 29 Dec 2004 10:47:02 -0800, "bsmalik"
<bs*****@discus sions.microsoft .com> wrote:
Please help!!!

"bsmalik" wrote:
it does not work...The problem remains

"Eliyahu Goldin" wrote:
> try specifying the full path of the image like c:\inetpub\wwwr oot\...
>
> Eliyahu
>
> "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> news:1E******** *************** ***********@mic rosoft.com...
> > hello Eliyahu,
> >
> > I tried by moving the image to the bin folder and still does not work and
> i
> > really dono y. Do u have an msn or email id? Please help me.
> >
> > Thanks.
> >
> > "Eliyahu Goldin" wrote:
> >
> > > That's why you can't find it.The dll is in the bin directory. Either use
> > > file path, or thing about another way of getting the image.
> > >
> > > Eliyahu
> > >
> > > "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> > > news:57******** *************** ***********@mic rosoft.com...
> > > > hello Eliyahu,
> > > >
> > > > Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my
> aspx
> > > > file. But still i get file not found.
> > > >
> > > > please help.
> > > >
> > > > thanks,
> > > > bsmalik
> > > >
> > > > "Eliyahu Goldin" wrote:
> > > >
> > > > > Is the image in the same directory with the dll for the assembly?
> That's
> > > > > where you call is looking for it.
> > > > >
> > > > > Eliyahu
> > > > >
> > > > > "bsmalik" <bs*****@discus sions.microsoft .com> wrote in message
> > > > > news:A1******** *************** ***********@mic rosoft.com...
> > > > > > Hi All,
> > > > > >
> > > > > > I am trying to do a simple thing.
> > > > > > -----------------------------
> > > > > > Dim NCImage As System.Drawing. Image =
> > > > > System.Drawing. Image.FromFile( "NC.jpg")
> > > > > > ----------------------------
> > > > > > I have the image NC.jpg and its a valid image but the error i get
> is
> > > > > > FileNotFound. Can u plez tell me whats wrong?
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>


Nov 19 '05 #9

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

Similar topics

1
3828
by: D. Yates | last post by:
Hi, I am looking for an example of how to extract bitmap images from an embedded resource file (a file with *.res extension, which can be viewed inside of the ide and can hold bitmaps, icons, string tables, etc.) and place them into a imagelist. I have found examples using the resource manager to create a "resource file" like so:...
5
20029
by: Fabio | last post by:
private void Apri_Click(object sender, System.EventArgs e) { OpenFileDialog fileChooser=new OpenFileDialog(); //fileChooser.Filter="tiff images (*.tiff)|*.tiff"; DialogResult result = fileChooser.ShowDialog(); Image immagine = New Image(fileChooser.FileName);
2
2351
by: Robson Carvalho Machado | last post by:
Dear Friends, Does anybody knows how to use the below code with an image stored at SQL Image field? Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ScaleStatic("/website/images/default_03.jpg", 50) End Sub
2
11965
by: steve | last post by:
imports system.drawing imports system.drawing.image dim img as image = image.fromfile("a.bmp") picturebox1.image = img i'm using vs 2003 and the error i have is that fromfile is not a member of system.drawind.image...what gives?!? tia,
18
1833
by: John | last post by:
Hi I am trying to display an image in a dialog using the following code; Dim frm As New frmImage Dim z As System.Drawing.Bitmap z.FromFile("c:\temp\image.gif") frm.picImage.Image = z frm.ShowDialog()
15
5311
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 path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run...
4
3042
by: escristian | last post by:
Hello. I'm trying to create an Image so I use something like this: Image newImage = Image.FromFile(filename); Now when it's a bmp file and certain .gif files it gives me an exception that says: "Invalid parameter used". The gif an bmp files are valid image files, I can open them in any graphics software and windows can do the preview.
5
3351
by: Jerry J | last post by:
I want to use the System.Drawing.Image class. According to the help file, this is an abstract base class. Because it is supposedly abstract, I created another class that inherits from it. However, when I did this I got the following error: 'System.Drawing.Image.Image()' is inaccessible due to its protection level Looking at other online...
14
16311
by: Steve K. | last post by:
I have a method that I use to get a System.Drawing.Image from a file without keeping a handle on the file open (so I can delete the file). Here is the code: <code> public static Image ImageFromFileReleaseHandle(string filename) { FileStream fs = null; try {
4
5009
by: Marcolino | last post by:
Hi, I have simple needs but I don't know how to implement it. I have application that create Dynamic Button. I need to set the image on this button, getting the icon from a form. So pratically I need to convert dinamically a Form.Icon to Button.Image runtime, but i don't know how. Any help would be appreciated. Many Thanks
0
7707
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7803
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3475
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.