Page 2 of 5

Re: BOS TAURUS: Questions and Suggestions

Posted: Thu Nov 08, 2012 5:55 pm
by srvet_claudio
mol wrote: how to output generated image to png/jpg file?
Is it possible?
I will try to make a function to do it.
Best Regards,
Claudio.

Re: BOS TAURUS: Questions and Suggestions

Posted: Thu Nov 08, 2012 5:59 pm
by IMATECH
Hi Mol !

hbFImage doesn't need C/C++ knowledge

Just a Sample:

Code: Select all


#include "freeimag.ch"

...

LOCAL oImg
...
   /* Init FreeImage */
   fi_Initialise()
...
   oImg := fi_Load( FIF_BMP, 'AnyFile.bmp', BMP_DEFAULT )
//   oImg := fi_Load( FIF_JPEG, 'AnyFile.jpg', JPEG_DEFAULT )
//   oImg := fi_Load( FIF_PNG, 'AnyFile.png', PNG_DEFAULT )
//   oImg := fi_Load( FIF_TIFF, 'AnyFile.tif', TIFF_DEFAULT )
//   oImg := fi_Load( FIF_GIF, 'AnyFile.gif', GIF_DEFAULT )
...
   fi_Save( FIF_BMP, oImg, 'NewFile.bmp', BMP_DEFAULT  )
   fi_Save( FIF_JPEG, oImg, 'NewFile.jpg', JPEG_DEFAULT  )
   fi_Save( FIF_PNG, oImg, 'NewFile.png', PNG_DEFAULT  )
   fi_Save( FIF_TIFF, oImg, 'NewFile.tif', TIFF_DEFAULT  )
   fi_Save( FIF_GIF, oImg, 'NewFile.gif', GIF_DEFAULT  )
...            
   /* Unload Image */
   fi_Unload( oImg )
...
   /* End FreeImage */
   fi_Deinitialise()
...
add hbfimage.hbc to your .hbp / .hbc project

FreeImage.DLL at:
http://downloads.sourceforge.net/freeim ... 4Win32.zip

FreeImage ( Full Sources ) at:
http://downloads.sourceforge.net/freeim ... ge3154.zip



Best regards

Re: BOS TAURUS: Questions and Suggestions

Posted: Thu Nov 08, 2012 7:09 pm
by mol
WOW!
Wonderful!
It's really easy!

Re: BOS TAURUS: Questions and Suggestions

Posted: Thu Nov 08, 2012 11:23 pm
by srvet_claudio
srvet_claudio wrote:
mol wrote: how to output generated image to png/jpg file?
Is it possible?
I will try to make a function to do it.
Best Regards,
Claudio.
Hi Marek,
I did it... :D

Code: Select all

    hBitmap := Proc_Create_Logo ()

   #define BT_FILEFORMAT_BMP   0
   #define BT_FILEFORMAT_JPG   1 
   #define BT_FILEFORMAT_GIF   2
   #define BT_FILEFORMAT_TIF   3
   #define BT_FILEFORMAT_PNG   4

   BT_SAVE_GDIPLUS_IMAGE (hBitmap, "LOGO_BMP.bmp", BT_FILEFORMAT_BMP)
   BT_SAVE_GDIPLUS_IMAGE (hBitmap, "LOGO_JPG.jpg", BT_FILEFORMAT_JPG)
   BT_SAVE_GDIPLUS_IMAGE (hBitmap, "LOGO_GIF.gif", BT_FILEFORMAT_GIF)
   BT_SAVE_GDIPLUS_IMAGE (hBitmap, "LOGO_TIF.tif", BT_FILEFORMAT_TIF)
   BT_SAVE_GDIPLUS_IMAGE (hBitmap, "LOGO_PNG.png", BT_FILEFORMAT_PNG)
Here I leave an example.
In the next version of Bos Taurus I will add this function.
Best Regards,
Claudio.

Re: BOS TAURUS: Questions and Suggestions

Posted: Fri Nov 09, 2012 4:25 am
by Rathinagiri
That is just fantastic Claudio. :)

I think it will now be possible for one to create a simple image viewer and tweaker software.

Re: BOS TAURUS: Questions and Suggestions

Posted: Fri Nov 09, 2012 6:20 am
by mol
Super!
You are really Speedy Gonzales :lol:

Many thanks!

Re: BOS TAURUS: Questions and Suggestions

Posted: Fri Nov 09, 2012 11:21 am
by srvet_claudio
rathinagiri wrote:That is just fantastic Claudio.
mol wrote:Super!
You are really Speedy Gonzales
Thanks Rathi and Marek.
rathinagiri wrote:I think it will now be possible for one to create a simple image viewer and tweaker software.
Yes of course, would be a nice app.

Best Regards,
Claudio.

Re: BOS TAURUS: Questions and Suggestions

Posted: Fri Nov 09, 2012 3:26 pm
by Pablo César
Wow Dr. !!

Creating images files here in HMG ??? Fantastic !

Congratulations !

Re: BOS TAURUS: Questions and Suggestions

Posted: Fri Nov 09, 2012 3:32 pm
by srvet_claudio
Pablo César wrote:Wow Dr. !!

Creating images files here in MHG ??? Fantastic !

Congratulations !
Thanks Pablo.

Re: BOS TAURUS: Questions and Suggestions

Posted: Fri Nov 09, 2012 4:56 pm
by danielmaximiliano
Hola Claudio :
hace rato descargue de nuevo HMG.3.0.46 y queria saber si esta es la ultima version de Bos Taurus, mi pregunta es porque compile de nuevo el proyecto Incomming Email y sigue borradose el titulo que esta arriba del Toolbar.
o estoy haciendo mal ya que el rectangulo sigue estando.

Code: Select all

/*****************************************************************************/   
 Procedure ON_PAINT_Incomming()
/*****************************************************************************/
 LOCAL nWidth  := BT_ClientAreaWidth  ("Incomming")
 LOCAL nHeight := BT_ClientAreaHeight ("Incomming")  
 LOCAL hDC, BTstruct , nTypeText
   nTypeText  := BT_TEXT_OPAQUE + BT_TEXT_BOLD + BT_TEXT_UNDERLINE + BT_TEXT_ITALIC
   hDC = BT_CreateDC ("Incomming", BT_HDC_INVALIDCLIENTAREA, @BTstruct)
   BT_FillRectangle (hDC, 100 ,   2 , nWidth , nHeight  , GREEN , GREEN , 1 )
   BT_FillRoundRect (hDC, 190 , 445 ,  575 , 410 , 8, 8 , GREEN , WHITE , 2)
 Return