[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

out of memory if picturebox image set at design time, okay if assigned at run-time ?

Bill Woodruff

10/24/2004 3:55:00 AM

V.S. .NET 1.1

I assume that when I set the image property of a picturebox at design time using
the IDE to a very large image (5456x9854 jpg file) and it crashes with an out of
memory error that something has happened where it is unable to create the .resx
file ?

If I assign the picturebox image at run-time in the load event of the form, it
works okay.

Appreciate any comments that would help me correctly understand this.

best, Bill Woodruff
dotScience
Chiang Mai, Thailand

"wisdom is when no one doubts your own hypotheses more than you do"


17 Answers

Bob Powell

10/24/2004 2:31:00 PM

0

Hello Bill,
I suspect that this is due to an error encoding the file as a base64 image
and could be due to attempting to hold the image and it's base64
representation in memory at the same time.

An image this large would require in exess of 215 megabytes for the image
alone plus the base64 encoding which would be around 320 megabytes for the
encoded image. If you've got under a gig of memory in the machine this will
definitely present a problem. There may also be a problem with creating a
RESX file of that size. Certainly it's not a good idea because when embedded
into the application the size of the executable would be at least 215
megabytes.

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

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

The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
Bob's Blog: http://bobpowelldotnet.blogspot.co...






"Bill Woodruff" <billw at dotscience dot com> wrote in message
news:Ow$kA1XuEHA.2072@tk2msftngp13.phx.gbl...
> V.S. .NET 1.1
>
> I assume that when I set the image property of a picturebox at design time
using
> the IDE to a very large image (5456x9854 jpg file) and it crashes with an
out of
> memory error that something has happened where it is unable to create the
..resx
> file ?
>
> If I assign the picturebox image at run-time in the load event of the
form, it
> works okay.
>
> Appreciate any comments that would help me correctly understand this.
>
> best, Bill Woodruff
> dotScience
> Chiang Mai, Thailand
>
> "wisdom is when no one doubts your own hypotheses more than you do"
>
>


Frank Hileman

10/24/2004 4:20:00 PM

0

Yes, it has been my experience that the resx serializer/deserializer does
not scale well when working in VS. Even relatively small images can cause
large delays. There is an alternative form of embedding that does not
require base64 encoding: add the image to your project, set the ContentType
property to embedded resource, and load as an assembly-level resource.

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor


"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:eb6M7YduEHA.3188@TK2MSFTNGP15.phx.gbl...
> Hello Bill,
> I suspect that this is due to an error encoding the file as a base64 image
> and could be due to attempting to hold the image and it's base64
> representation in memory at the same time.
>
> An image this large would require in exess of 215 megabytes for the image
> alone plus the base64 encoding which would be around 320 megabytes for the
> encoded image. If you've got under a gig of memory in the machine this
will
> definitely present a problem. There may also be a problem with creating a
> RESX file of that size. Certainly it's not a good idea because when
embedded
> into the application the size of the executable would be at least 215
> megabytes.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/gdipl...
>
> The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
> Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
> Bob's Blog: http://bobpowelldotnet.blogspot.co...
>
>
>
>
>
>
> "Bill Woodruff" <billw at dotscience dot com> wrote in message
> news:Ow$kA1XuEHA.2072@tk2msftngp13.phx.gbl...
> > V.S. .NET 1.1
> >
> > I assume that when I set the image property of a picturebox at design
time
> using
> > the IDE to a very large image (5456x9854 jpg file) and it crashes with
an
> out of
> > memory error that something has happened where it is unable to create
the
> .resx
> > file ?
> >
> > If I assign the picturebox image at run-time in the load event of the
> form, it
> > works okay.
> >
> > Appreciate any comments that would help me correctly understand this.
> >
> > best, Bill Woodruff
> > dotScience
> > Chiang Mai, Thailand
> >
> > "wisdom is when no one doubts your own hypotheses more than you do"
> >
> >
>
>


Sir Ray

7/25/2011 1:25:00 AM

0

On Jul 24, 6:16 pm, Frank Bascomb <fra...@genesis.com> wrote:
> That's your problem right there, MSNBC... all hatred and lies 24 hours a day.

No, the hatred and lies on MSNBC only occurs 3 hours a day, 6-9am
Monday thru Friday (Morning Joke)
The rest of MSNBC programming is reality and facts (even the prison-
planet Lock-up shows on the weekend) which is why you're having a hard
time comprending it...

Felix Reynaldo

7/25/2011 2:18:00 AM

0


"Sir Ray" <waterboi5000@hotmail.com> wrote in message
news:3458a3e8-441d-4166-bc76-559f1e141d72@a15g2000yqk.googlegroups.com...
On Jul 24, 6:16 pm, Frank Bascomb <fra...@genesis.com> wrote:
> That's your problem right there, MSNBC... all hatred and lies 24 hours a
> day.

No, the hatred and lies on MSNBC only occurs 3 hours a day, 6-9am
Monday thru Friday (Morning Joke)
The rest of MSNBC programming is reality and facts (even the prison-
planet Lock-up shows on the weekend) which is why you're having a hard
time comprending it...

====================

Don't count Joe short. He is starting to come around. He finally admitted,
like Sen. Alan Simpson, the GOP is crap and not the party of which he was
once a part. But I like Mike Barnicle and Donnie Deutsch best of all on
that show. Mika is also very nice.

Gunner Asch

7/25/2011 8:01:00 AM

0

On Sun, 24 Jul 2011 18:25:14 -0700 (PDT), Sir Ray
<waterboi5000@hotmail.com> wrote:

>On Jul 24, 6:16?pm, Frank Bascomb <fra...@genesis.com> wrote:
>> That's your problem right there, MSNBC... all hatred and lies 24 hours a day.
>
>No, the hatred and lies on MSNBC only occurs 21 hours a day, except for 6-9am
>Monday thru Friday (Morning Joke)
>The rest of MSNBC programming is unreality and bullshit (even the prison-
>planet Lock-up shows on the weekend) which is why you're having a hard
>time comprending it...

Indeed!

Gunner


--
Maxim 12: A soft answer turneth away wrath.
Once wrath is looking the other way, shoot it in the head.

Sir Ray

7/25/2011 1:38:00 PM

0

On Jul 25, 4:01 am, Gunner Asch <gunnera...@gmail.com> wrote:
> On Sun, 24 Jul 2011 18:25:14 -0700 (PDT), Sir Ray
>
> <waterboi5...@hotmail.com> wrote:
> >On Jul 24, 6:16 pm, Frank Bascomb <fra...@genesis.com> wrote:
> >> That's your problem right there, MSNBC... all hatred and lies 24 hours a day.
>
> >No, the hatred and lies on MSNBC only occurs 21 hours a day, except for  6-9am
> >Monday thru Friday  (Morning Joke)
> >The rest of MSNBC programming is unreality and bullshit (even the prison-
> >planet Lock-up shows on the weekend) which is why you're having a hard
> >time comprending it...
>
> Indeed!
>
> Gunner

So, Gunner, I guess you're just entering sixth grade this fall, right?
I can't really imagine anyone older than that finding the lame "I
fixed it for you" edit-joke funny, unless they are drunk or stoned out
of their mind...hmm, from your posts in other threads, that second
possible seems quite likely.

And Felix,
"Don't count Joe short. He is starting to come around. He finally
admitted,
like Sen. Alan Simpson, the GOP is crap and not the party of which he
was
once a part. But I like Mike Barnicle and Donnie Deutsch best of all
on
that show. Mika is also very nice."

Nah, Joe Scarborough is Joe Scarborough and he is never going to come
along (well, never is a long time - how about 'unlikely to'). At a
certain point even the most unbelieving have to accept the cold hard
reality that the GOP of even the 1980s, let alone the 1950s, is gone,
taken over by insane wingnuts - well, unless you're either some
certain UseNet posters or Glen Beck...

I'm afraid the whole show puts MSNBC in a poor light, but what are
you gonna do? Hey, I know - put Al Sharpton as Joe's new co-host -
that'll really wake things up, and Al's already under contract for
MSNBC too!

Shall not be infringed

7/25/2011 3:06:00 PM

0

On Jul 24, 7:25 pm, "Felix Reynaldo" <FelixReyna...@hotmail.com>
wrote:
> From: "Frank Bascomb" <fra...@genesis.com>
> Date: Sunday, July 24, 2011 6:16 PM
>
> On 24 Jul 2011, "Felix Reynaldo" <FelixReyna...@hotmail.com> posted somenews:j0hjem$q7r$1@dont-email.me:
>
> > The first half hour of Meet the Press is simply politicians
> > enunciating their party's prepared stand on things, so I don't pay too
> > much attention to that.
> >http://www.msnbc.msn.com/i...
>
> That's your problem right there, MSNBC.  They might as well change the
> name to the left-wing hate channel, all hatred and lies 24 hours a day.
>
> ==============
>
> That's funny.  Rightwing dogshit telling me about hate.
>
> The only hate is from dogshit  like yourself. You are the hatemongers that
> attempt to assassinate Democratic congress members.
>
> It's hate dogshit like yourself that bring assault weapons to appearances by
> the POTUS.
>
> It's hate dogshit that have vandalized the office space of Democratic
> congress members.
>
> It's hate dogshit like yourself -- in this case a war criminal -- that seem
> to think that freshman House members have the right to threaten other House
> members with impunity.
>
> It's hate dogshit  like yourself that murder abortion doctors.
>
> It's hate dogshit like yourself that murdered hundreds of Federal workers
> and their children in Oklahoma City and now in Norway.
>
> Now the hate dogshit is telling us that unless we have the government of the
> United States financed on the backs of the elderly they will wreck the faith
> and credit of the United States.
>
> You rightwing dogshit are a cancer with no redeeming value.

Yours sounds a lot like hate speech to me.

I hope you are picked up soon before you do something bad.

Shall not be infringed

7/25/2011 3:11:00 PM

0

On Jul 24, 11:54 pm, Deucalion <some...@nowhere.net> wrote:
> On Sun, 24 Jul 2011 22:16:50 +0000 (UTC), Frank Bascomb
>
> <fra...@genesis.com> wrote:
> >On 24 Jul 2011, "Felix Reynaldo" <FelixReyna...@hotmail.com> posted some
> >news:j0hjem$q7r$1@dont-email.me:
>
> >> The first half hour of Meet the Press is simply politicians
> >> enunciating their party's prepared stand on things, so I don't pay too
> >> much attention to that.
> >>http://www.msnbc.msn.com/i...
>
> >That's your problem right there, MSNBC.  They might as well change the
> >name to the left-wing hate channel, all hatred and lies 24 hours a day.
>
> Someone has to counterbalance FOX news.

Ahem, Fox >>>IS<<< the counterbalance doofus.

Felix Reynaldo

7/25/2011 3:14:00 PM

0


"Shall not be infringed" <hot-ham-and-cheese@hotmail.com> wrote in message
news:9016a53f-2b55-4c60-b3ca-0129ade17c24@a2g2000prf.googlegroups.com...
On Jul 24, 7:25 pm, "Felix Reynaldo" <FelixReyna...@hotmail.com>
wrote:
> From: "Frank Bascomb" <fra...@genesis.com>
> Date: Sunday, July 24, 2011 6:16 PM
>
> On 24 Jul 2011, "Felix Reynaldo" <FelixReyna...@hotmail.com> posted
> somenews:j0hjem$q7r$1@dont-email.me:
>
> > The first half hour of Meet the Press is simply politicians
> > enunciating their party's prepared stand on things, so I don't pay too
> > much attention to that.
> >http://www.msnbc.msn.com/i...
>
> That's your problem right there, MSNBC. They might as well change the
> name to the left-wing hate channel, all hatred and lies 24 hours a day.
>
> ==============
>
> That's funny. Rightwing dogshit telling me about hate.
>
> The only hate is from dogshit like yourself. You are the hatemongers that
> attempt to assassinate Democratic congress members.
>
> It's hate dogshit like yourself that bring assault weapons to appearances
> by
> the POTUS.
>
> It's hate dogshit that have vandalized the office space of Democratic
> congress members.
>
> It's hate dogshit like yourself -- in this case a war criminal -- that
> seem
> to think that freshman House members have the right to threaten other
> House
> members with impunity.
>
> It's hate dogshit like yourself that murder abortion doctors.
>
> It's hate dogshit like yourself that murdered hundreds of Federal workers
> and their children in Oklahoma City and now in Norway.
>
> Now the hate dogshit is telling us that unless we have the government of
> the
> United States financed on the backs of the elderly they will wreck the
> faith
> and credit of the United States.
>
> You rightwing dogshit are a cancer with no redeeming value.

Yours sounds a lot like hate speech to me.

I hope you are picked up soon before you do something bad.

Felix Reynaldo

7/25/2011 3:19:00 PM

0


"Shall not be infringed" <hot-ham-and-cheese@hotmail.com> wrote in message
news:9016a53f-2b55-4c60-b3ca-0129ade17c24@a2g2000prf.googlegroups.com...
On Jul 24, 7:25 pm, "Felix Reynaldo" <FelixReyna...@hotmail.com>
wrote:
> From: "Frank Bascomb" <fra...@genesis.com>
> Date: Sunday, July 24, 2011 6:16 PM
>
> On 24 Jul 2011, "Felix Reynaldo" <FelixReyna...@hotmail.com> posted
> somenews:j0hjem$q7r$1@dont-email.me:
>
> > The first half hour of Meet the Press is simply politicians
> > enunciating their party's prepared stand on things, so I don't pay too
> > much attention to that.
> >http://www.msnbc.msn.com/i...
>
> That's your problem right there, MSNBC. They might as well change the
> name to the left-wing hate channel, all hatred and lies 24 hours a day.
>
> ==============
>
> That's funny. Rightwing dogshit telling me about hate.
>
> The only hate is from dogshit like yourself. You are the hatemongers that
> attempt to assassinate Democratic congress members.
>
> It's hate dogshit like yourself that bring assault weapons to appearances
> by
> the POTUS.
>
> It's hate dogshit that have vandalized the office space of Democratic
> congress members.
>
> It's hate dogshit like yourself -- in this case a war criminal -- that
> seem
> to think that freshman House members have the right to threaten other
> House
> members with impunity.
>
> It's hate dogshit like yourself that murder abortion doctors.
>
> It's hate dogshit like yourself that murdered hundreds of Federal workers
> and their children in Oklahoma City and now in Norway.
>
> Now the hate dogshit is telling us that unless we have the government of
> the
> United States financed on the backs of the elderly they will wreck the
> faith
> and credit of the United States.
>
> You rightwing dogshit are a cancer with no redeeming value.

Yours sounds a lot like hate speech to me.

I hope you are picked up soon before you do something bad.

==================

"bad?"
Let's see what's bad...

You are the guys that do the murdering of abortion physicians.

You are the guys that murdered over a hundred people in Oklahoma City.

You are the guys that have threatened "second amendment solutions."

You are the guys that brought automatic weapons to a venue where the POTUS
was speaking

And then there was the attempted murder of a member of congress in Arizona.