Error OutOfMemoryException

Started by romeroa, March 07, 2017, 10:06:32 AM

Previous topic - Next topic

romeroa

Hi.
First of all tell that this control is magnificent.
But I'm having a problem when I include it as a reference in a VN.Net project (Visual Studio 2015).
I include as reference the library Cyotek.Windows.Forms.ImageBox.dll.
An error occurs while loading the third image (jpg) of a series: 'System.OutOfMemoryException' in System.Drawing.dll
To load the image I use the LoadFromFile method.
How can I solve this problem?
Thank you.

romeroa

I have already fixed the error.

Another question:
How zoomin/zoomout is limited in MouseWheel event?

Thank you.

Richard Moss

Hello,

Welcome to the forums! Glad you resolved your issue. As noted in this topic ImageBox only displays pictures that you load. If .NET can't load your image, you can always try other libraries such as FreeImage which have .NET wrappers and may be able to load your image.

Specially in regards to getting System.OutOfMemoryException when loading an image, this doesn't always mean an memory issue, it appears to be a generic error when an unknown problem is encountered.

In regards to your zoom question, there is a ZoomLevels property which lets you customise the zoom intervals used for zoom operations. You can see the default values here. There is a hardcoded limit of 1 for the minimum zoom level and 3500 for the maximum however.

Hope this helps!

Regards;
Richard Moss
Read "Before You Post" before posting. Do not send me private messages. Do not expect instant replies.

All responses are hand crafted. No AI involved. Possibly no I either.

romeroa

Thank you Richard.

Solved!

Regards.