Large Image Eating Away At Memory

Jun 22, 2010

Ok so i have an jpg image of around 8.10mbs at around 13424 x 11344 pixels, i need to load the whole image in to a scrolling picturebox, is they anyway to do this without using so much memory for example like what google maps does n cuts the image down and some how stitches it all back to gether?

View 1 Replies


ADVERTISEMENT

[VB2005] Rotateflip Image Is Eating More Memory Than Non Rotated Image ?

Sep 8, 2009

I'm writing a program that print images in full page. I.E, I print image on A4 paper, landscape. When I print an image without rotating it (the image IS landscape), the image uses all the space of the page, and is not cropped. it is OK. The print job is about 1.5 Mb. When I print an image WITH rotating it (the image IS PORTRAIT ), the image uses all the space of the page, and is not cropped. it is OK. The print job is about 28 Mb. The images are about 2000x3000 pixels, and stored in JPEG files (about 2.5 Mb each). I suppose that the 28 Mb should be the "uncompressed" size of the picture, and 1.5Mb, the compressed size...

By the way, When I look at the task manager, my application memory usage grows by job size, which seems to be OK. It grows either 1,5 Mb if no rotation is occured, and 25-30Mb when rotation occured.

Since I can print hundreds of image at once, my print queue will grow abnormaly if I need to rotate all

View 8 Replies

IDE :: Why Visual Studio 2005 Keeps Eating Up Memory Even It Is In Editing Mode

Nov 23, 2009

I am using Visual Studio 2005 with Service Pack1 installed. I am working on VB.Net project. However I am constantly choked up even I am in editing mode, i.e., I am NOT in debugging mode. Here is what bothers me:

[Code]...

View 2 Replies

Loading An Image From A Jpeg That Exists In Memory (but Not On Disk) Using Direct Memory Access

Nov 5, 2009

In VB 2005, I am calling a C++ DLL function that returns the address in memory and size in bytes of a jpeg image. How can I load that jpeg image directly from memory into a picture box in my VB form? I cannot afford to save it to disk first.

View 10 Replies

Memory Leak In A Very Large ASP.NET Application

Jun 17, 2012

I have a problem with a memory leak in a very large ASP.NET application. After about 24 hours of usage (sometimes a lot more) an OutOfMemory exception is thrown. Therefore I am trying to understand how managed memory works in .NET. When does an ASP.NET application throw an OutOfMemory exception? The server has a lot of RAM and there is always plenty of memory left when an OutOfMemory exception is thrown. I understand the difference between virtual memory and physical memory. How much memory does the W3WP process have to consume before an OutOfMemory exception is thrown? Is there a setting somewhere e.g. in the Machine.Config file? The ASP.NET process is never recycled.

View 2 Replies

Memory Leak In Large Array?

Feb 12, 2010

I need to improve memory performance on my application and I could see that I have problems with memory fragmentation.I've read an interesting article on large objects from Andrew Hunter of Red Gate, and one of the solutions he recommends isow do I implement his suggestion in my code?My program has a very complex form (with an object that leaves residual memory every time it opens. I found a complex list that may be the culprit, and I'd like to implement his suggestion to see if it fixes the issue.

View 1 Replies

Picturebox Using Large Amount Of Memory

Dec 31, 2008

I'm loading an image, then getting size and such info from it, and loading the image into a picture box. Now it works and all, but I noticed it uses a large amount of memory. I'm doing: img = Image.FromFile(file)Where I load the image, 'file' being just a string containing path to an image on the hd. After that, I get the size and frame count (if any), and load it into a picture box: The image I've been testing with, is a 6600x5100 3.5MB JPEG, which can be downloaded from url...Watching task manager, when the app loads the image, it takes up about 104MB of memory. I've tried doing img.Dispose after the above line, but it brings up an error. If I put a button on the form with img.Dispose in it, and click it after app has loaded, it drops down to about 6MB of memory used. Loading the image directly into the picture box using .Load or .LoadAsync, after disposing img beforehand, still ends up with a huge amount of memory used.

So I'm wondering if theres a way to check if the picture box has fully loaded the img, so then I can Dispose the img and free up the memory. Or maybe a better way all together of loading an image into a picture box, and/or getting size & frame count, without having to use up that amount of memory before freeing.

View 2 Replies

Retrieving A Large BLOB And Keep Getting An Out Of Memory Exception?

Feb 18, 2010

I am retrieving a large BLOB and keep getting an Out Of Memory Exception. It occurs when I use a SqlDataReader to either check if the column is NULL, or if I try to read it and assign it to a Byte type of parameter, or if I use Response.BinaryWrite.

View 2 Replies

.net - Server Halts Due To Large StringBuilder Instance In Memory?

Aug 2, 2010

So, I have this code that grabs a bunch of data from the database, and performs a bunch of calculations on that data. However, this is not what is causing the halt. The halt is coming in when I take all that "final" data that has been prepared, and go to write that into a text file.

Each line in the text file is being created from data that has had calculations performed on it. Each line "corresponds" to a record from the database. A user will have to perform this file export usually on about 30-40 thousand records at a time. Now, even though I am using a StringBuilder, this still halts because of the pure mass amount of records.

What I do currently in the code is create one StringBuilder, append all the data (after calcs) to it, convert it to a String, add it to a List(Of String) to be returned from the Function, and then clear the StringBuilder, and do the same for the next row, and I do this until each row has been created and appended, converted, and then inserted into the List.

Then, another class receives this List(Of String) and takes each String and eventually appends it to a file.

Does anyone have an idea of how to improve this code and make it so it doesn't halt the server every time? The reason it wasn't found out until now is because when I tested it locally I was testing it on only 1-50 records at a time.

[Code]...

View 4 Replies

Out Of Memory Exception / Parallel.For Loop / Large Numbers?

Nov 27, 2011

I need some guidance on a little program I'm making (one that I thought would take a couple of hours from start to finish, it's been days now ...) that determines all of the proper divisors of any given number up to the maximum value of a UInt32.

View 8 Replies

VS 2010 : Working With Large Amounts Of Data Without Getting Out Of Memory?

Apr 25, 2011

I recently wrote a program that collects information from the network can displays it in a DGV for the user to see. I tested this on networks where I would end up with several thousand items brought back and all worked fine, very little memory increase and once the search had finished the memory usage went back to pretty much what it was before the search, so I assume I have no major memory leaks that I should be concerned about (I'm careful to always dispose of things and clear large variables where possible).

However, a new company has now started using my application and they have several hundred thousand items that my program will find. They reported that they leave the program running its search for a few hours and most of the time it crashes with an Out Of Memory exception. Now I did have my app do some caching of certain information to avoid querying the network more than was necessary so I thought well maybe this is what is causing it but I added an option to turn that off and they say it still happens. So the only thing I can see it being is simply the amount of data that the program is finding and having to store in memory.once my application has gathered information about the items it stores them in a List(Of MyItemClass) and then when the search is complete the items are added to the DGV. So I'm thinking maybe its just the size of this List(Of MyItemClass) that is simply getting too large. Bear in mind that each instance of MyItemClass in this List can have quite a lot of information in it as it has several properties that are List(Of String) that may contain a few thousand strings in some scenarios.How do you deal with such large amounts of data without running out of memory?I'm assuming the only option I have got is to 'page' some of the data to a temporary file on disk once I get over a certain number of items in the List(Of MyItemClass)?

View 2 Replies

VS 2010 HTTPListener Of Large Memory Stream Vs File I/o

Feb 24, 2012

I have a user interface app that allows you to drag/drop in files - and it turns them into HttpListener request POST's to another EXECUTABLE that I have running - let's call it BACKEND1. BACKEND1 will be running on a SERVER when this gets ready for production use. Lots and lots of users running the UI - all dragging in files - all getting POST'ed to BACKEND1 - with the file included as a memory stream in the POST. BACKEND1 responds to the UI with a "sequential" file number assigned to the file centrally on the server.

On the SERVER is also running another EXECUTABLE - let's call it BACKEND2. It's job is to work with the DRAG'd in files. Both BACKEND1 and BACKEND2 sit on the same SERVER. At the moment I am writing the memory stream to DISK in BACKEND1 - and POSTing the FILENAME to BACKEND2 for it to work on. Would it be better to not write the file in BACKEND1 but instead include it in the POST to BACKEND2 - where it can be written to DISK? Is having LARGE HTTP REQUEST's a burden when sent between two EXECUTABLES on the same machine?

My primary goal is to have a really available BACKEND1 talking the the UI instances running out in the world. I'm concerned that doing the file i/o in BACKEND1 is "expensive" - and I don't care about the performance of BACKEND2 as much. just looking for opinions. I guess ultimately I'll have to bench mark this myself in a production environment to get a real answer.

View 1 Replies

Generating A Rather Large Memory Leak - Every 5 Seconds It Calls CheckSettings

Sep 19, 2009

I seem to be having some issues with my code here. The sub "CheckSettings" is actually run off of a system timer, so that every 5 seconds it calls CheckSettings (actually, i set it to every 1 second for debugging, so i can see the leak a little more clearly by monitoring the process). CheckSettings basically checks to ensure there isn't already an instance of the thread running, and if there is, it checks to ensure that the instance has completed running ... once it has the go ahead, it creates a new thread and runs again.

code:

This code is creating a very large memory leak. After a few minutes of running, my application goes from a memory footprint of about 45,000 K to about 1,000,000 K. Quite the leak. I read some articles on the managed versus unmanaged memory etc, and I was careful to free the objects etc.

View 3 Replies

VS 2010 HTTPListener Of Large Memory Stream Versus File I/o?

Sep 28, 2010

I have a user interface app that allows you to drag/drop in files - and it turns them into HttpListener request POST's to another EXECUTABLE that I have running - let's call it BACKEND1.BACKEND1 will be running on a SERVER when this gets ready for production use.Lots and lots of users running the UI - all dragging in files - all getting POST'ed to BACKEND1 - with the file included as a memory stream in the POST. BACKEND1 responds to the UI with a "sequential" file number assigned to the file centrally on the server.

On the SERVER is also running another EXECUTABLE - let's call it BACKEND2. It's job is to work with the DRAG'd in files.Both BACKEND1 and BACKEND2 sit on the same SERVER. At the moment I am writing the memory stream to DISK in BACKEND1 - and POSTing the FILENAME to BACKEND2 for it to work on.Would it be better to not write the file in BACKEND1 but instead include it in the POST to BACKEND2 - where it can be written to DISK?

Is having LARGE HTTP REQUEST's a burden when sent between two EXECUTABLES on the same machine?My primary goal is to have a really available BACKEND1 talking the the UI instances running out in the world. I'm concerned that doing the file i/o in BACKEND1 is "expensive" - and I don't care about the performance of BACKEND2 as much.

View 2 Replies

Is There Any Real Advantage To Run A GC.collect After That Our Application Has Used A Large Quantity Of Memory Or It Is Just A Psychological Factor?

Jun 29, 2011

is there any real advantage to run a GC.collect after that our application has used a large quantity of memory or it is just a psychological factor?

View 17 Replies

Out Of Memory Exception For StringBuilder.ToString Method For Large Size Of String Data

May 19, 2010

I am facing an amazing problem in my application. On my Developement server when I am running my application, then there is one function where I am trying to put whole stringbuilder contents in a string object. This Function is used for paging the reports.For that I am using a method of Stringbuilder.tostring() and when I chek the value of this statement (stringbuilder.tostring()) it shows no such interface is supported, which later on throws exception of system is out of memory. Here i am using .net 2.0 framework and sql server 2005 database.But when I run the application on stagging server then there is no such exception thrown.[code]

View 3 Replies

Print A Large Image?

Oct 21, 2009

How can i print a large image using vb.net? A A4 paper seems not be enough!

View 18 Replies

.net - Send And Receive A Large Image Using Tcp?

Dec 19, 2010

I need to send and receive a large image between programs running on different machines within the same network.

I've looked at using upd however ran into problems with the size of the packets and
(after breaking the image into smaller pieces to get past this problem) the number of packets needing to be processed all at once - and ultimately packet loss.

I've also thought of sending the image by storing it in a common file folder and receiving it by using file watcher as a trigger. However, this just adds further complexities in setup where common folders don't already exist.

Assuming I'm barking up the right tree looking at tcp, can someone point me to/provide an example of how to send an image file using it (vb.net would be ideal). Also, are there practical limits to tcp package sizes?

View 2 Replies

Large Amount Of Image Files For App?

Jun 19, 2010

Just a doubt: if I have large amount of image files for my app, is it ok to store them in the resource file ?

Will those files be saved in a single resource file ? Will that cause any problem to the performance of my app ? When I try to access a image file from the resource using code, will it load that file only into the memory or the entire image contents from the resource file ?

View 4 Replies

Load A Very Large Image In To A Picture Box?

Oct 15, 2009

ok so i currently have a large image loading in to a picture box the image is 13424 x 11344 and 8.10mbs and it up around 460,000k of memory i was just wondering if they was a more efficient way of loading this image?

View 4 Replies

Fit A Large Image On Screen Keeping Its Ratio?

May 4, 2012

The title asks it all, if i have a form with a picturebox (dock = fill), and it loads a bigger picture than the screen bounds, and i want that form to resize so it fits the screen but having the same ratio as the picture size. How shall i do this?

View 4 Replies

Interface And Graphics :: Open Very Large Image

Aug 13, 2008

I have a map image and i want to open it look like ACDSEE (very fast)my image is 12756 x 8504 pixel and i try backbuffer but not work for me.

View 3 Replies

VS 2008 TcpClient Eating Up CPU?

Oct 2, 2009

I've been working on a program where clients will send short messages to a server.[URL]

On the server side, this code is running to check for incomming messages:

Private mClient As System.Net.Sockets.TcpClient
...
Do
bytesRead = mClient.GetStream.Read(readBuffer, 0, BYTES_TO_READ)

[Code].....

View 4 Replies

Scrollable Display Of Extremely Large Image On A Form

Aug 11, 2009

I am an experienced programmer but mainly in 4GLs and assembly. Relatively new to VB programming, especially GUI applications. On a form I need to create an area that will be used to display *extremely* large TIFF images. typical image size would be 2000 pixels by 100,000 pixels. Typically I will NOT want to display the entire image at once, so the area will need to have scroll bars and/or other methods to scroll/pan around the image.

I have read about and tinkered with the bitmap and picturebox objects, including some threads about several different ways to implement scrollbars. However, I see that the picturebox size is limited to 32K pixels in both dimensions. I suppose that I might be able to copy various portions of the bitmap to the picturebox depending on scroll position, but that seems potentially quite slow and cumbersome. Can an expert developer who is experienced with these types of issues regarding the following:

1. Can bitmap objects be used effectively with TIFF images of the size I am working with?

2. an approach that should produce reasonable scrolling performance for these extremely large images without excessive coding effort?

3. For an image that exceeds the picturebox size when displayed at 1:1 scale, is the picturebox capable of displaying a reduced size version of such an image without lots of code, and if so, how?

4. Many (most?) graphics display objects count on all of their display data being stored in memory rather than on disk. Would that be true of a TIFF image loaded into a bitmap object and displayed via a picturebox? If so, the amount of RAM required in order to buffer the entire image in memory could be a potential problem for images of this size. Is there an advisable way to have the picturebox or other display object only load portions of the image into memory on an as needed basis, and purge them once they are no longer required? Are there any built in objects/methods/properties or is there any sample code to show how to do this?

View 12 Replies

VS 2010 Webbrowser Program Eating Up Too Much Ram?

Jan 19, 2012

I have a simple code that visits web pages. It's done in VB2010 & it's just a simple form with a web browser control built in. After leaving it on for a few hours, it goes from using about 50mb of RAM to 700mb. All it's doing is visiting 1-web page per 2 minutes from a txt list of url's.

What can I do to flush/reset this un-needed RAM usage without re-starting the program itself?

View 9 Replies

Winform Group Box Is Eating Button

Jun 13, 2011

I have a WinForms group box that needs to be sized programmatically. Everything else is working well but I am having trouble with the below line of code because as the form is re-sized larger the group box grows over the buttons that are underneath. I am looking for a way in code so that the group box grows with the form, but no so large that it grows over the button underneath it.

[Code]...

View 1 Replies

SetResolution For Image In Memory

Apr 8, 2009

I'm trying to set a resolution to 600 for an image.I have:

-Public img As New Bitmap(6600, 4800)
-Public gr As Graphics = Graphics.FromImage(img)[code]

View 3 Replies

.Net 2008 IDE Hanging - MSVB7.dll Eating 100% CPU When Editing Code?

Mar 26, 2010

Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes.I am having a problem with msvb7.dll eating 50%+ cpu on my dual core system. This usually lasts 10-30 seconds or so, during which time the IDE is non-responsive.

This occurs when I do pretty much anything in the text editor, and can be replicated by simply adding blank lines to a function, and then deleting them. Or pasting some code. Or... lotsa stuff.

SP1 installed I had DevExpress' refactor/coderush, components, and codeit.right installed, but have removed all 3 of them. (I had installed the latest version of Refactor Pro! (9.3.4), perhaps the day before)

I have tried a VS.NET Repair. There is a kb that referenced some cpu destroying with vb, but it was included in SP1

[Code]...

View 3 Replies

Add A Bitmap Image In Memory To A Page?

May 20, 2009

I'm trying to add an bitmap image in memory to a page using a System.Windows.Forms.PictureBox object, but it's not working. Here is my

HTML
Dim bytes As SqlBytes = reader.GetSqlBytes(0)
Dim image As Bitmap = New Bitmap(bytes.Stream)
Dim picBox As PictureBox = New PictureBox()

[Code].....

View 5 Replies

Image Looping Used Big Memory And Added?

Mar 9, 2009

I create a program that loop the images in the picturebox, now the concern is while the images is looping or changing the usage of the memory of the usage of the computer is going bigger.i mean it's added the new usage memory when picture is changing. i wanted to dispose the previous usage so that maintain the usage level, but i don't know how

[Code]...

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved