BOS TAURUS: Questions and Suggestions

Source code related resources

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Re: BOS TAURUS: Questions and Suggestions

Post by srvet_claudio » Thu Nov 08, 2012 5:55 pm

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: 174
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.
Has thanked: 1 time
Been thanked: 3 times

Post by IMATECH » Thu Nov 08, 2012 5:59 pm

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
mol
Posts: 3248
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 231 times
Been thanked: 132 times
Contact:

Post by mol » Thu Nov 08, 2012 7:09 pm

WOW!
Wonderful!
It's really easy!

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Thu Nov 08, 2012 11:23 pm

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 164 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Rathinagiri
Posts: 5264
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 169 times
Been thanked: 172 times
Contact:

Post by Rathinagiri » Fri Nov 09, 2012 4:25 am

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: 3248
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 231 times
Been thanked: 132 times
Contact:

Post by mol » Fri Nov 09, 2012 6:20 am

Super!
You are really Speedy Gonzales :lol:

Many thanks!

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Fri Nov 09, 2012 11:21 am

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
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Fri Nov 09, 2012 3:26 pm

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: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Fri Nov 09, 2012 3:32 pm

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: 2162
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 174 times
Been thanked: 26 times
Contact:

Post by danielmaximiliano » Fri Nov 09, 2012 4:56 pm

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

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

Post Reply