RPREVIEW

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

RPREVIEW

Post by byte-one »

If i print a document that contains a alpha-bmp the little picture on the left side from preview are not painted well. Only this alpha-picture to see.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: RPREVIEW

Post by cnavarro »

Gunther, maybe this will help

viewtopic.php?f=3&t=35303#p210223
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: RPREVIEW

Post by byte-one »

Cristobal, no. It seems that the routine to build the bmps from the page-emfs for the listview not be able to read correct the emf with included alpha-bmps!?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: RPREVIEW

Post by cnavarro »

Can you put an image?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: RPREVIEW

Post by byte-one »

You see on this pictures the effect. EMF cannot handle transparency (MSDN)! In GDI-plus there are a class to handle EMF with transparency.
Image
Image
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: RPREVIEW

Post by nageswaragunupudi »

On the right hand side you see the EMF, which is properly displaying the alpha images.
So, EMF can handle alpha images.

What you comment is about the bitmaps displayed in the left side image list. That is an issue with our conversion of emf to bitmaps.
Regards

G. N. Rao.
Hyderabad, India
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: RPREVIEW

Post by byte-one »

Mr. Rao, you are right! The problem is also on some (but NOT all) JPGs.
An other wish: On class GDIBmp is the handle named "hBmp". On other picture-classes the handle is named "hBitmap". So we cannot use this class for Imagelist,...!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: RPREVIEW

Post by nageswaragunupudi »

Add this line in GDIBmp class

Code: Select all | Expand


ACCESS hBitmap INLINE ::hBmp
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: RPREVIEW

Post by byte-one »

I have tested this function to make hBmp from the EMF-File, but very slow. We should have a better function to load EMFs. There are in GDI+ classes for metafiles. My capabilities are to small to handle this.

Code: Select all | Expand

Function hBmpFromX( cFile, nWidth, nHeight )     //emf-file, width, height
   local hBmp
   local oBmp
   oBmp:= GDIBmp():New(cFile)
  if !obmp:is32Bits()
        obmp:Conver24to32Alpha( .t. )
  endif
    IF ( !Empty( nWidth ) .or. !Empty( nHeight ) )
        oBmp:Resize( nWidth, nHeight )
    endif
    hBmp:= oBmp:GetGDIHbitmap()
    oBmp:End()
Return hbmp
Regards,
Günther
---------------------------------
office@byte-one.com
Post Reply