From: Chris Becke on

"Grzegorz Wr�bel" </dev/null(a)localhost.localdomain> wrote in message
news:ek29ms$fo3$1(a)nemesis.news.tpi.pl...
> Does it exist? The documantation on standard GDI library and
> BITMPAPINFOHEADER mentions BI_JPEG and BI_PNG compression types but I
> never saw a working code that would took advantage of that. Seems they
> never finished this.

This particular option exists purely to allow *printers* that support JPEG
images tio be supplied raw JPEG images. GDI doesnt decode JPEGs supplied at
all like this, it relies on device suport :- see the documentation for
ExtEscape to see how to test for JPEG support.



From: news@rtrussell.co.uk on
Grzegorz Wróbel wrote:
> Full path is not that trouble, however I can't get OleLoadPicturePath
> working.

It works just fine for me: I use it all the time! Did you remember to
convert the pathname to Unicode (MultiByteToWideChar)?

Richard.
http://www.rtrussell.co.uk/
To reply by email change 'news' to my forename.

From: Grzegorz Wróbel on
news(a)rtrussell.co.uk wrote:
> Grzegorz Wr�bel wrote:
>> Full path is not that trouble, however I can't get OleLoadPicturePath
>> working.
>
> It works just fine for me: I use it all the time! Did you remember to
> convert the pathname to Unicode (MultiByteToWideChar)?

Yes, I did provided full path and converted it to wide character string.
The problem might be that I'm not sure what to pass as first parameter.
I left NULL as I saw on some example, the call crashed.

--
Grzegorz Wr�bel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D
From: news@rtrussell.co.uk on
Grzegorz Wróbel wrote:
> Yes, I did provided full path and converted it to wide character string.
> The problem might be that I'm not sure what to pass as first parameter.
> I left NULL as I saw on some example, the call crashed.

Do you mean the second parameter (the first parameter is the pathname)?
I've always passed NULL as the second parameter and it doesn't crash
here:

OleLoadPicturePath(wpath,NULL,NULL,NULL,IID_IPicture,(LPVOID*)&ipic);

Richard.
http://www.rtrussell.co.uk/
To reply by email change 'news' to my forename.

From: Grzegorz Wróbel on
news(a)rtrussell.co.uk wrote:
> Grzegorz Wr�bel wrote:
>> Yes, I did provided full path and converted it to wide character string.
>> The problem might be that I'm not sure what to pass as first parameter.
>> I left NULL as I saw on some example, the call crashed.
>
> Do you mean the second parameter (the first parameter is the pathname)?
> I've always passed NULL as the second parameter and it doesn't crash
> here:
>
> OleLoadPicturePath(wpath,NULL,NULL,NULL,IID_IPicture,(LPVOID*)&ipic);

Yes, of course I meant second. Maybe it was something wrong with the
path or I forgot to get adress of &ipicture). I try to compile version
with OleLoadPicturePath as well, should a bit shorter.

Now, the main problem I have with these methods, either OleLoadPicture()
or OleLoadPicturePath() is that I really want to obtain bitmap bits in
RGB format. I can put the HBITMAP into DC and call GetDIBits, but if the
DC is 16 or 8bit this will result in quality loss.

--
Grzegorz Wr�bel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D