I want to load a multipage TIFF image into memory as an Image object but I read that the FromFile method locks the file.
Can I load this into a stream, close the physical file then manipulate the image there?
Thanks
Scott 4 8361
Hi,
Open the image with image.fromstream.
Dim fs As New System.IO.FileStream("C:\camera.bmp", IO.FileMode.Open)
Dim img As Image = Image.FromStream(fs)
fs.Close()
PictureBox1.Image = img
Ken
------------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:eR**************@TK2MSFTNGP15.phx.gbl...
I want to load a multipage TIFF image into memory as an Image object but I
read that the FromFile method locks the file.
Can I load this into a stream, close the physical file then manipulate the
image there?
Thanks
Scott
Hi,
Open the image with image.fromstream.
Dim fs As New System.IO.FileStream("C:\camera.bmp", IO.FileMode.Open)
Dim img As Image = Image.FromStream(fs)
fs.Close()
PictureBox1.Image = img
Ken
------------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:eR**************@TK2MSFTNGP15.phx.gbl...
I want to load a multipage TIFF image into memory as an Image object but I
read that the FromFile method locks the file.
Can I load this into a stream, close the physical file then manipulate the
image there?
Thanks
Scott
But this is in the MSDN documentation.
Remarks
You must keep the stream open for the lifetime of the Image object.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Hi,
Open the image with image.fromstream.
Dim fs As New System.IO.FileStream("C:\camera.bmp", IO.FileMode.Open)
Dim img As Image = Image.FromStream(fs)
fs.Close()
PictureBox1.Image = img Ken
------------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message news:eR**************@TK2MSFTNGP15.phx.gbl... I want to load a multipage TIFF image into memory as an Image object but I read that the FromFile method locks the file.
Can I load this into a stream, close the physical file then manipulate the image there? Thanks
Scott
But this is in the MSDN documentation.
Remarks
You must keep the stream open for the lifetime of the Image object.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Hi,
Open the image with image.fromstream.
Dim fs As New System.IO.FileStream("C:\camera.bmp", IO.FileMode.Open)
Dim img As Image = Image.FromStream(fs)
fs.Close()
PictureBox1.Image = img Ken
------------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message news:eR**************@TK2MSFTNGP15.phx.gbl... I want to load a multipage TIFF image into memory as an Image object but I read that the FromFile method locks the file.
Can I load this into a stream, close the physical file then manipulate the image there? Thanks
Scott This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eric.Jones |
last post by:
I've encountered a strange error with loading delimited files from a
Samba (SMB) network drive, has anyone else seen this before?
(Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db)
...
|
by: user |
last post by:
Hello
I finally managed to save Bitmap that reprezented my pictureBox to jpg
file, but now how can i load from that file to Bitmap again ?
Bitmap does not have any Load or Open method (like...
|
by: Scott Meddows |
last post by:
I want to load a multipage TIFF image into memory as an Image object but I read that the FromFile method locks the file.
Can I load this into a stream, close the physical file then manipulate the...
|
by: jz |
last post by:
Hi All,
I have an ActiveX control project, in the main form, I have an image
control and load a JPG image from by setting Picture property of Image;
I build it and everything is good, I...
|
by: John please don't spam me! |
last post by:
VB.Net 2003
Hi,
2 questions:
1. I want to read a file in without locking it, as it is Log file.
2. I want to be able to read from the last point it wa read upto.
The project is:
Search...
|
by: nuhura01 |
last post by:
Hi all...
My system contains an image which I have saved it at client side.
Unfortunately, when users want to view the image, the image doesn't
loaded. If i'm not mistaken, it is set at the HTML...
|
by: elamberdor |
last post by:
Hi All!
Well, i'm modifying a dynamic map, with lat and long datapoints, my problem is it loads in text perfectly onto exact points I specify on the map,
..well now I want to load in...
|
by: Marcolino |
last post by:
Hy Guys,
I have a problem loading JPG in a Picture Box.
I need to load a jpg files into a PB and then unlock the original JPG.
I'm using following code:
Dim picture1 As PictureBox
Dim...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
| |