FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour ¿Existe libreria que pueda utilizar para imagenes?
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
¿Existe libreria que pueda utilizar para imagenes?
Posted: Fri May 11, 2012 12:52 AM

Hola.

Tengo un lote de imagenes jpg que necesito cambiarles el tamaño.
Existe alguna libreria que pueda utilizar para hacerme una aplicacion?

gracias.

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 498
Joined: Thu May 10, 2007 08:30 PM
Re: ¿Existe libreria que pueda utilizar para imagenes?
Posted: Fri May 11, 2012 09:18 AM
goosfancito puedes intentar utilizar el API CopyImage.

Yo le he implementad así:
Code (fw): Select all Collapse
HB_FUNC( COPYMIMAGE )  //  CopyMImage( HBITMAP hBitmap, INT nWidth, INT nHeight, UINT nType, UINT nFlag )  -> hBitmap
   {
   HBITMAP hNewBmp ;
   HBITMAP hBitmap = ( HBITMAP )   hb_parnl( 1 ) ;
   int nX          = ( int )       hb_parni( 2 ) ;
   int nY          = ( int )       hb_parni( 3 ) ;
   UINT nType      = ( UINT ) IF( !hb_parnl( 4 ), IMAGE_BITMAP,      hb_parnl( 4 ) ) ;
   UINT nFlag      = ( UINT ) IF( !hb_parnl( 5 ), LR_COPYDELETEORG,  hb_parnl( 5 ) ) ;

   hNewBmp = CopyImage( hBitmap, nType, nX, nY, nFlag ) ;

   hb_retnl( ( LONG ) hNewBmp ) ;
   }

Espero que tesirva.

Saludos
Peaaaaaso de foro...

FWH 2007 - xHarbour - BCC55

Continue the discussion