FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RPREVIEW
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
RPREVIEW
Posted: Tue Mar 06, 2018 08:35 PM

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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RPREVIEW
Posted: Tue Mar 06, 2018 09:09 PM

Gunther, maybe this will help

viewtopic.php?f=3t=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
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: RPREVIEW
Posted: Tue Mar 06, 2018 09:39 PM

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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RPREVIEW
Posted: Tue Mar 06, 2018 09:41 PM

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
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: RPREVIEW
Posted: Wed Mar 07, 2018 11:25 AM
You see on this pictures the effect. EMF cannot handle transparency (MSDN)! In GDI-plus there are a class to handle EMF with transparency.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: RPREVIEW
Posted: Wed Mar 07, 2018 02:17 PM

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
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: RPREVIEW
Posted: Wed Mar 07, 2018 10:03 PM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: RPREVIEW
Posted: Thu Mar 08, 2018 01:09 PM
Add this line in GDIBmp class

Code (fw): Select all Collapse
ACCESS hBitmap INLINE ::hBmp
Regards



G. N. Rao.

Hyderabad, India
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: RPREVIEW
Posted: Tue Mar 13, 2018 01:43 PM
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 (fw): Select all Collapse
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

Continue the discussion