473,411 Members | 2,013 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,411 software developers and data experts.

Open huge Tiff Image

kunal pawar
297 100+
Hello,
Can any body tell me load Tiff file having size around 600MB, using C# in windows application
Nov 12 '08 #1
13 4757
tlhintoq
3,525 Expert 2GB
I assume you've looked over the various methods and tips from a google search

What have you done so far?
Does your existing code work with small TIFF's but fail on the big one?
What kind of errors are you getting when you open the large TIFF?
Nov 13 '08 #2
kunal pawar
297 100+
I tried through following statement

Bitmap picBitmap = new Bitmap(@"Location");


but it gives error "Out Of Memory"

I have to load Tiff file upto 500MB

Please help me !!!
Nov 13 '08 #3
vanc
211 Expert 100+
Add more memory, I guess!!!
Nov 13 '08 #4
kunal pawar
297 100+
Can u tell me how i can add memory ?
Nov 14 '08 #5
MrMancunian
569 Expert 512MB
Can u tell me how i can add memory ?
Memory is hardware that you mount on your motherboard. You can buy it in a lot of computershops...

Steven
Nov 14 '08 #6
tlhintoq
3,525 Expert 2GB
It is fair to point out that "Out of memory" is also the error you get if you try to open a graphic that is not ready to be opened, usually because it is opened in another program... maybe still being written etc.

Also the line you are using:

Expand|Select|Wrap|Line Numbers
  1. Bitmap picBitmap = new Bitmap(@"Location");
while simple, sucks. It holds the file open on the hard drive until you are done with the bitmap object and your program disposes of it.

Make sure you copy the bitmap to a new bitmap object as soon as you can and dispose of the 'link' to the file. Otherwise your program is keeping the file open and even you won't be able to read it in a second time if you tried to for some reason.

Expand|Select|Wrap|Line Numbers
  1. Bitmap tempBitmap = new Bitmap(@"Location");
  2. Bitmap myBitmap = (Bitmap)tempBitmap.Clone();
Or something similar has treated me well in the past.

Of course this means that for a moment you will have 2 x 500meg objects in memory. So you need a lot of RAM for this project.
Nov 14 '08 #7
tlhintoq
3,525 Expert 2GB
I tried through following statement

Bitmap picBitmap = new Bitmap(@"Location");


but it gives error "Out Of Memory"

I have to load Tiff file upto 500MB

Please help me !!!
What about the other questions?
Does your code work with small TIFF files?
If your code doesn't work with ANY files then there is no point trying to make it work with the big ones. If it does work with the small ones then you know the code is good, but that you need more memory for your PC.
How much memory is in the PC?
How much is available (not already in use by the O.S. & other programs?
Nov 14 '08 #8
kunal pawar
297 100+
Yes, my application can open small TIFF files.
But i guess u r not getting my point. Or it is not problem of my Hardware memory.
Coz my application is not getting crash.



Any body knows solution
Nov 17 '08 #9
tlhintoq
3,525 Expert 2GB
Yes, my application can open small TIFF files.
But i guess u r not getting my point. Or it is not problem of my Hardware memory.
Coz my application is not getting crash.



Any body knows solution

If it opens small TIFF files then your code is probably good.
If you get "out of memory" error when loading large files, then you are probably out of memory. Take your computer to a computer service center and pay to have more installed.
Nov 18 '08 #10
balabaster
797 Expert 512MB
My thought is do the same thing they did with the software they used to create the hi-res images of the Mona Lisa. Only open the bit that's visible in the viewing window... as the window is scrolled, open the bit that becomes visible...

I have to say though, I don't work with graphics on a day to day basis, so unfortunately I don't know exactly how you'd go about that... but it can't be too difficult.
Nov 18 '08 #11
kunal pawar
297 100+
sorry dear,
if it is problem due to my Hardware then that huge image should not open using any 3rd party component. But it does. 3rd party component can open my Tiff file.
Nov 18 '08 #12
tlhintoq
3,525 Expert 2GB
sorry dear,
if it is problem due to my Hardware then that huge image should not open using any 3rd party component. But it does. 3rd party component can open my Tiff file.

When you say "3rd party component" do you mean a component that plugs into Visual Studio? Or do you mean a different program, such as Photoshop?

There are lots of ways around the memory problem. For example Photoshop does its own virtual memory scheme of swapping out pages of memory for space on the hard drive. That's why it has setting for which drives are acceptable for temp files.

Just because another program handles the big TIF doesn't mean the other program is storing it all in memory. So you may have to do the same: Find a creative way around the problem.
Nov 19 '08 #13
kunal pawar
297 100+
3rd party mean, already developed OCX control.
Nov 19 '08 #14

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

Similar topics

2
by: Al Reid | last post by:
Is it possible to display an image that is stored on the server as a TIFF image, on an ASP.Net page without the use of an add-in viewer? If so, could someone tell me how to do it? TIA -- Al...
0
by: Will Arrowsmith | last post by:
Hi All, I am trying to create a .tiff file to fax using the windows fax service FAXCOMLib. I have created an array of images (bitmaps) and converted them to 1pbb format in order to allow...
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
6
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On...
3
by: Andres Corrada-Emmanuel | last post by:
Hello, I have installed PIL 1.1.5 on Windows with Python 2.4. I'm unable to open .tiff images that I can open and view using Windows Explorer. In other words, this simple test fails: import...
1
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but...
7
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g....
10
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, Please help me to write a dll in C# , that will read each pages of a tiff image from a file and a memory stream object ( need two ways) and creatre a new tiff image object.The dll should...
3
by: GiJeet | last post by:
Hello, we have an app that scans documents into TIFF format and we need to transfer them over the internet. If anyone knows of a SDK we can use that can compress TIFFs on the fly or even if it can...
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
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
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,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.