RPREVIEW

RPREVIEW

Postby byte-one » Tue Mar 06, 2018 8: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: RPREVIEW

Postby cnavarro » Tue Mar 06, 2018 9:09 pm

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
cnavarro
 
Posts: 6522
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RPREVIEW

Postby byte-one » Tue Mar 06, 2018 9: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: RPREVIEW

Postby cnavarro » Tue Mar 06, 2018 9: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
User avatar
cnavarro
 
Posts: 6522
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RPREVIEW

Postby byte-one » 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.
Image
Image
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: RPREVIEW

Postby nageswaragunupudi » Wed Mar 07, 2018 2: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
User avatar
nageswaragunupudi
 
Posts: 10469
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: RPREVIEW

Postby byte-one » 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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: RPREVIEW

Postby nageswaragunupudi » Thu Mar 08, 2018 1:09 pm

Add this line in GDIBmp class

Code: Select all  Expand view

ACCESS hBitmap INLINE ::hBmp
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10469
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: RPREVIEW

Postby byte-one » Tue Mar 13, 2018 1: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: Select all  Expand view
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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 52 guests