BOS TAURUS: Questions and Suggestions

Source code related resources

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: BOS TAURUS: Questions and Suggestions

Post 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
Last edited by IMATECH on Thu Nov 08, 2012 7:44 pm, edited 3 times in total.
M., Ronaldo

By: IMATECH

Imation Tecnologia
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post 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.
Attachments
Logo2.rar
(47.67 KiB) Downloaded 328 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post by mol »

Super!
You are really Speedy Gonzales :lol:

Many thanks!
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: BOS TAURUS: Questions and Suggestions

Post by Pablo César »

Wow Dr. !!

Creating images files here in HMG ??? Fantastic !

Congratulations !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post by srvet_claudio »

Pablo César wrote:Wow Dr. !!

Creating images files here in MHG ??? Fantastic !

Congratulations !
Thanks Pablo.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post 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
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply