473,804 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Out of memory exception while loadin a tiff image

33 New Member
Hi,

Im loading a tif image of size more than 4MB, into the picture box. With the help of following code snippet.

FileStream fs = File.OpenRead(i magePath);

Image img = Image.FromStrea m(fs);

But while executing the statement Image.fromstrea m(), Im getting the exception System.Outof memory exception. Any suggestion for this problem........ ..
Jan 24 '07 #1
5 2117
radcaesar
759 Recognized Expert Contributor
What is the amount of RAM and Virtual memory u have ?

Debug the application and Check ur memory, system resource consumption by using Task Manager.

:)
Jan 24 '07 #2
alwayssmiling
33 New Member
Hi,

My systems Ram Size is 512MB virtual memory size is 700MB. Then wat may be the prob for this exception to occur..........
Jan 24 '07 #3
radcaesar
759 Recognized Expert Contributor
Check the occupied memory after or during the file upload.

I don't wanna the original configuration of the system. Debug and check the resource.

:)
Jan 24 '07 #4
alwayssmiling
33 New Member
ya,

while debugging also its not behaving improperly. There is no sudden increase in memory requirement. Its working fine up to getting the stream format of the image from the file,

filestream fs = File.OpenRead(i magepath);

but while getting the actual image from the stream its generating the actual problem.

Image img = Image.FromStrea m(fs);

Thank u for ur reply.......... .
Jan 24 '07 #5
Poojakale
1 New Member
Hi,

Just do save as jpg once again for the same image and then load this image in the control.
May 18 '07 #6

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

Similar topics

2
5997
by: michael | last post by:
Hi there, I am using the Python Image package to do some Image conversion. I have a "pgm" Image and this must be converted to a "1" Bits / Sample Tiff Image. There for I am using Image.save ("lala.tiff"). *hm* A Tiff Image opt. consists of several pages so I am thinking about using the pytiff package as well. The existing code is like that parser = ImageFile.Parser () parser.feed (imagecontent)
0
4072
by: John Bonds | last post by:
I have designed a multi-threaded application that manipulates images (CCITT Group 4 TIFF Images). I'm getting some strange behavior and I'm wondering if anyone else is seeing the same thing. I run a batch process that reads in pages of one of these TIFF files, separates them out into different TIFF files, saves them to a file (in a new thread) and disposes properly of all the memory that was used. I run this batch process and monitor the...
6
6661
by: sternr | last post by:
Hey, When I try to run the following code: System.Drawing.Image tiffImage = System.Drawing.Image.FromFile(@"C: \Image.tiff"); I get an "Out Of Memory" Exception. Does anybody know how can I overcome this problem?
4
3395
by: FrankMeng | last post by:
When I tried to load 2GB tiff file, I got an "out of memory" error. I have 512MB memory, but I set virtual memory to 5GB. Is it possible to cut the big tiff file into several sub-images without loading the whole image?
0
9712
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10595
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10089
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7634
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
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
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.