Re: How to detect lack of memory failure
From: George Yachán (2muchspam_at_wherever.com)
Date: 02/21/05
- Next message: Debbie: "Re: Access to the image in the picture control"
- Previous message: Mike D Sutton: "Re: How to detect lack of memory failure"
- In reply to: Mike D Sutton: "Re: How to detect lack of memory failure"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Feb 2005 13:03:15 -0500
Yes! I think we are on the same page now. I agree with you that I need to
ascertain why the problem is happening. Since I can't be physically present
when the black image occures and since I can't reproduce the problem on my
own Win98 machine my plan is to create a log file on these remote machines
which I will later be able to examine. The most important event to log is
the occurance of this blank image condition and in order to do that, I must
be able to tell when the image control is in this black state. I will try to
use GetDIBits() to test each image for some non-black pixels.
The JPEG images are all good; I supply them along with the app.
Thanks a lot for your help. Your GDI test is pretty cool too.
"Mike D Sutton" <EDais@mvps.org> wrote in message
news:e2yqvvDGFHA.1084@tk2msftngp13.phx.gbl...
>> Thanks for the help. I think I did a poor job of explaining what I want,
>> though. I don't have a problem with changing the image size.
>>
>> My app (running on old, remote Win98 client machines) steps through
>> numerous
>> different jpg files and passes them to the image control for display. The
>> images are of various sizes and color depths. Sometimes when the display
>> is
>> about to be changed, the control resizes its borders correctly for the
>> new
>> image, but it displays nothing but black within those borders.
>>
>> I want my app to be able to 'know' when the correct image is not being
>> displayed. I am looking for some way to use code to examine each image to
>> determine whether it is all black or not. I thought there might be some
>> way
>> to examine the image control's picture property?
>
> You can inspect the image's data using GetDIBits() however I think that's
> probably the wrong way to go about it if I'm
> understanding the question correctly this time. Instead I would attempt
> to ascertain _why_ this is happening, it's not
> something I've experienced before though so I don't know where to suggest
> you start looking. One thing though that may
> be the cause, especially if you're working with JPEG images which come
> from an unreliable source such as the internet,
> you may be dealing with broken images. In this case have a look at my
> SafeLoadImage() function in place of
> LoadPicture()
> You'll find the function linked from this thread, and also a fix for it's
> .GIF support near the bottom (of course if you
> don't care about GIF support then the original works as-is):
> http://groups.google.co.uk/groups?th=bf6eed1f95e0b921
> Hope this helps,
>
> Mike
>
>
> - Microsoft Visual Basic MVP -
> E-Mail: EDais@mvps.org
> WWW: http://EDais.mvps.org/
>
>
- Next message: Debbie: "Re: Access to the image in the picture control"
- Previous message: Mike D Sutton: "Re: How to detect lack of memory failure"
- In reply to: Mike D Sutton: "Re: How to detect lack of memory failure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|