| Computers Forum Index » Computer - Graphics (Algorithms) » Controlling brightness and contrast |
|
Page 1 of 1 |
|
| Author |
Message |
| Dave Eberly |
Posted: Sun Jun 05, 2005 3:48 pm |
|
|
|
Guest
|
"Emanuele Gesuato" <emanueleLEVAMIgesuato@virgilio.it> wrote in message
news:F0Aoe.982994$b5.42688736@news3.tin.it...
Quote: Thanks for you help but i don't want to use this workaround. There is some
memory leak in the code and i want to optimize it (if possible) and run it
with big images without out of memory error.
You do understand that Java uses reference counting and
garbage collection? There is no "memory leak". Most
likely the line of code you mentioned is attempting to
allocate more memory from the heap than what is provided
by the default Java settings. The only way around this is
to tell Java to use a larger heap. And this is *not* a
"workaround". It is a necessity.
--
Dave Eberly
http://www.geometrictools.com |
|
|
| Back to top |
|
|
|
| Jesper |
Posted: Mon Jun 06, 2005 3:08 pm |
|
|
|
Guest
|
Emanuele Gesuato wrote:
Quote: oneDPix = new int[imgCols * imgRows];
imgCols = image.getWidth(null);
imgRows = image.getHeight(null);
I had just a very quick glance, but the above 3 lines looks like
they're in the wrong order. What are the values of imgCols and imgRows
when you allocate the int-array?
/Jesper |
|
|
| Back to top |
|
|
|
|