Re: Out of Memory when editing graphic...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



It should work just fine with VS2005 I think.

Just add a reference to the DLL in the .NET folder.

For other information you'll need to read the help in the Freeimage library
because although I know of it's existence I am unfamiliar with the product.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Wade" <wnederveld@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23xNuzf$XGHA.4988@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for the info, but as I said I new to VB 2005 express, so I may be
asking some stupid questions...

I don't know how to include or use the dll (assuming that I use the dll in
the Dist folder) in my VB code - I can't add it as a reference. Also, in
the Wrapper folder, there is a FreeImage.NET folder (Do I use this instead
of the dll in the Dist folder?) and in that is a src folder which contains
a build.bat and a couple of .cs (C#) files. It looks like the batch file
tries to create a dll using a c# compiler, but I'm using VB, so it doesn't
work. If I install C# 2005 express, would I then be able to create a dll
that would work in VB? Or am I just plain out of luck in trying to use
FreeImage with VB 2005?

Thanks again.

"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23H7ZoX%23XGHA.4432@xxxxxxxxxxxxxxxxxxxxxxx
You may have better luck with FreeImage which is a native library with a
.NET wrapper I beleive.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"Wade" <wnederveld@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:Ol15Ft8XGHA.3532@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have code that adds a BarCode to a scanned image that is stored in a
SQL database. It works fine for scanned images that are 8.5 x 11, but I
also have some images that are 24x36. When I try to add the barcode to
these larger images I get the Out of Memory error.

I put the image on a picturebox (which is on a Panel so I can scroll
around). I allow the user to select an area on the picturebox to place
the barcode. I set the image to a graphic (g), add the barcode (using
g.drawline), then when I reset the picturebox image to the updated image
(bitmap with the barcode included), I get the error on the larger
images.

The PixelFormat of these images are 32bppArgb and the size of the
smaller images are 3300x2550 pixels, and the larger are 7200x10800 -
obviously these are huge (4 bytes * 7200 * 10800 = 311,040,000 bytes -
the original TIF files were around 800K)

What are better ways to accomplish this task? Try to use a smaller
PixelFormat?...somehow load only parts of the image into the
picturebox?...other techniques?

Note, I am fairly new to VB 2005 (Express), and still learning so please
forgive me if these questions have been asked before - I've done quite a
bit of searching (msdn, google, newsgroups) and haven't found much on
this specific error using dotnet 2, VB 2005 and images.

Thanks in advance.







.



Relevant Pages

  • Re: Out of Memory when editing graphic...
    ... I don't know how to include or use the dll (assuming that I use the dll in ... the Dist folder) in my VB code - I can't add it as a reference. ... When I try to add the barcode to ... I put the image on a picturebox (which is on a Panel so I can scroll ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Zip files using VB6
    ... I have read several articles on the Internet, teaching me using .dll ... I've read a article about the "zip folder" function in Windows XP. ...
    (microsoft.public.vb.general.discussion)
  • Re: Service pack 3 problem
    ... Opening the regsvr32 file is as you say, no dll specified, followed by the ... and no dllcache folder exists, ... After show hidden files, folders, and system files, use WINDOWS Explorer ...
    (microsoft.public.windowsxp.general)
  • Re: Linking Application with the Library file
    ... I have never worked with LOADLIBRARY and GETPROCADDRESS. ... The DLL will go in the TARGET folder of your BSP and also in the ... <apellerin AT adeneo DOT adetelgroup DOT ...
    (microsoft.public.windowsce.embedded)
  • Re: Directory Layout Suggestions
    ... Go back to your Web Project and right click on the solution name> choose add existing project> navigate to the dll project you just created and select it. ... Right click the Web Project name> select add reference> Projects> select the class library project and yer set. ... use the App_Code folder to create your classes for what will eventually go into your class library. ... he creates another subdirectory called Class Libraries. ...
    (microsoft.public.dotnet.framework.aspnet)