From: DanB on

I'm wondering if anyone has seen something like this. I have been using
this for years, for lots of stuff:

void CPrinter::PrintImageMetric( LPCTSTR imagePath, LPRECT rect )
{
CImage img;
img.Load( imagePath );
if( ! img.IsNull( ) )
img.StretchBlt( pDC->GetSafeHdc( ), *rect );
}

And all of a sudden, just one image prints like the top one with a black
region and about a ninth sized image on a windows 7 machine.

<http://lakeweb.net/images/ptrbl.jpg>

On my XP machine and my wifes Vista, same exact image, project and
software, it prints correctly.

And you can see a little of a second photo on the good one, that photo
prints correctly on the 7 machine. I've tried re sampling the jpg, no
change.

I tried a different jpg, it fills the region properly.

I just tried it on another windows 7 machine, same client, the machine
was bought a month earlier, and no troubles on that machine. This seems
to be a one machine anomaly with just one jpg!

Baffled.

Thanks, Dan.



From: Joseph M. Newcomer on
When bitmaps don't print, it is usually a printer driver problem. For example, you need
to make sure the driver supports StretchBlt (See CDC::GetDeviceCaps). If it has the
stretchblt bit set to 0, then the operation is not supported.
joe

On Sat, 03 Apr 2010 12:24:51 -0700, DanB <abc(a)some.net> wrote:

>
>I'm wondering if anyone has seen something like this. I have been using
>this for years, for lots of stuff:
>
>void CPrinter::PrintImageMetric( LPCTSTR imagePath, LPRECT rect )
>{
> CImage img;
> img.Load( imagePath );
> if( ! img.IsNull( ) )
> img.StretchBlt( pDC->GetSafeHdc( ), *rect );
>}
>
>And all of a sudden, just one image prints like the top one with a black
>region and about a ninth sized image on a windows 7 machine.
>
><http://lakeweb.net/images/ptrbl.jpg>
>
>On my XP machine and my wifes Vista, same exact image, project and
>software, it prints correctly.
>
>And you can see a little of a second photo on the good one, that photo
>prints correctly on the 7 machine. I've tried re sampling the jpg, no
>change.
>
>I tried a different jpg, it fills the region properly.
>
>I just tried it on another windows 7 machine, same client, the machine
>was bought a month earlier, and no troubles on that machine. This seems
>to be a one machine anomaly with just one jpg!
>
>Baffled.
>
>Thanks, Dan.
>
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: DanB on
Joseph M. Newcomer wrote:
> When bitmaps don't print, it is usually a printer driver problem. For example, you need
> to make sure the driver supports StretchBlt (See CDC::GetDeviceCaps). If it has the
> stretchblt bit set to 0, then the operation is not supported.

Hi Joe,
It does print.

<http://lakeweb.net/images/ptrbl.jpg>

And early on I changed to three different printers and two different PDF
printers. The same printer drivers and pdf'rs are on the second windows
7 machine without this problem.

And like I said, it prints all the other jpegs fine, just this one jpeg
is acting strangly even if I open it in coral, resample and save it anew.

A different jpeg in the exact same place in the print job, and it prints
fine.

Tomorrow I'll see if I can just bitmap the image and make this go away.
As this is a very specific combo of machine and image problem I don't
think it is worth chasing down if I can cheat.

If the bitmap does the same thing it will be time to start up the
twilight zone music...

Best, Dan.
From: DanB on

It turns out I had bad info on the 'other' windows 7 machine, it is
actually vista. (I live in AZ and these two machines are somewhere in
Oregon.)

By converting the image to .bmp it now prints fine on the 7 machine.
Job done for now I guess...

Best, Dan.

From: DanB on

I thought I'd mention. I had the opportunity to test this on a second
'Windows 7' machine today. Exact same symptom. I'll keep a copy of this
jpeg in case someone at Microsoft is interested. The good news so far is
that I've yet to hear of it with any other of the jpegs we print. This
jpeg came from someones rendering where we may print many dozens of
photos per project, that come off cameras, and they print fine. It is
the only hint I have, that something may be odd about this jpeg. And
that messes on the 7 system, but not vista and xp.

Best, Dan.


DanB wrote:
>
> I'm wondering if anyone has seen something like this. I have been using
> this for years, for lots of stuff:
>
> void CPrinter::PrintImageMetric( LPCTSTR imagePath, LPRECT rect )
> {
> CImage img;
> img.Load( imagePath );
> if( ! img.IsNull( ) )
> img.StretchBlt( pDC->GetSafeHdc( ), *rect );
> }
>
> And all of a sudden, just one image prints like the top one with a black
> region and about a ninth sized image on a windows 7 machine.
>
> <http://lakeweb.net/images/ptrbl.jpg>
>
> On my XP machine and my wifes Vista, same exact image, project and
> software, it prints correctly.
>
> And you can see a little of a second photo on the good one, that photo
> prints correctly on the 7 machine. I've tried re sampling the jpg, no
> change.
>
> I tried a different jpg, it fills the region properly.
>
> I just tried it on another windows 7 machine, same client, the machine
> was bought a month earlier, and no troubles on that machine. This seems
> to be a one machine anomaly with just one jpg!
>
> Baffled.
>
> Thanks, Dan.
>
>
>