Re: How to display TIF picture ?
Posted: Sat Nov 21, 2009 5:39 pm
Yes, your EXE is workinggfilatov wrote: I have a working demo application compiled by HMG Extended Edition which is included in archive.
Is it works for you
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://www.hmgforum.com/
Yes, your EXE is workinggfilatov wrote: I have a working demo application compiled by HMG Extended Edition which is included in archive.
Is it works for you
Ricci,Ricci wrote:Where do i have to put the Lib to? Because i get this error log (only the beginning and endgfilatov wrote:[
and also you'll need freeimage.lib was taken from freeimage.dll contribution.
I have a working demo application compiled by HMG Extended Edition which is included in archive.
Is it works for you
Harbour 2.0.0beta3 (Rev. 12765)
Copyright (c) 1999-2009, http://www.harbour-project.org/
D:/hmg/harbour/lib/libhbfimage.a(fi_wrp.o):fi_wrp.c:(.text+0x17f): undefined reference to `_imp__FreeImage_Paste@20'
D:/hmg/harbour/lib/libhbfimage.a(fi_wrp.o):fi_wrp.c:(.text+0x31f): undefined reference to `_imp__FreeImage_Copy@20'
...
D:/hmg/harbour/lib/libhbfimage.a(fi_winfu.o):fi_winfu.c:(.text+0x4c2): undefined reference to `_imp__FreeImage_GetBits@4'
D:/hmg/harbour/lib/libhbfimage.a(fi_winfu.o):fi_winfu.c:(.text+0x4d0): undefined reference to `_imp__FreeImage_GetInfoHeader@4'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe test.o hbmk_j37rn7.o D:/hmg//resources/minigui.o -mwindows -Wl,--start-group -lminigui -lhbmysql -lmysql -lcrypt -ledit -leditex -lgraph -lini -lreport -lhbwin -lhbziparc -lhbmzip -lmsvfw32 -lvfw32 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbvpdf -lhbmemio -lhbsqlit3 -lsqlite3 -lhbfimage -lhbpgsql -lpq -lhbtip -lhbct -lhbmisc -lhbnetio -lxhb -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -otest.exe -LD:/hmg/harbour/lib -LD:/hmg//lib
Grigory, thank you so much ... now it´s my time to implement it in my program. You will get it message, when it´s ready for viewing.gfilatov wrote: Ricci,
I've adapted this sample for HMG 3.0 already.
Take a look for attached working demo with project files and needed library
Hi, Grigory !gfilatov wrote: I've adapted this sample for HMG 3.0 already.
Take a look for attached working demo with project files and needed library
Ricci,Ricci wrote: One question: you use the function FI_WinDraw( ) to draw the loaded grafic.
Is there any documentation about this function or others i may need ?
Thanks for your help ...
Code: Select all
* -------------------------------------------------------------------------- */
/* Draw an image in a window Box -------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* implementation: int scanlines = FI_WinDraw( FIBITMAP *dib, HDC hDC, nTop, nLeft, nBottom, nRight ); */
HB_FUNC( FI_WINDRAW )
{
if( hb_pcount() == 6 &&
hb_parinfo( 1 ) & HB_IT_POINTER &&
hb_parinfo( 2 ) & HB_IT_NUMERIC &&
hb_parinfo( 3 ) & HB_IT_NUMERIC &&
hb_parinfo( 4 ) & HB_IT_NUMERIC &&
hb_parinfo( 5 ) & HB_IT_NUMERIC &&
hb_parinfo( 6 ) & HB_IT_NUMERIC
)
{
FIBITMAP * dib;
HDC hDC;
RECT rcDest;
int scanlines;
/* Retrieve parameters */
dib = ( FIBITMAP * ) hb_parptr( 1 );
hDC = HB_ISNUM( 2 ) ? ( HDC ) ( HB_PTRUINT ) hb_parnint( 2 ) : ( HDC ) hb_parptr( 2 );
rcDest.top = hb_parni( 3 );
rcDest.left = hb_parni( 4 );
rcDest.bottom = hb_parni( 5 );
rcDest.right = hb_parni( 6 );
/* run function */
SetStretchBltMode( hDC, COLORONCOLOR );
scanlines = StretchDIBits(hDC, rcDest.left,
rcDest.top,
rcDest.right-rcDest.left,
rcDest.bottom-rcDest.top,
0, 0, FreeImage_GetWidth(dib), FreeImage_GetHeight(dib),
FreeImage_GetBits(dib), FreeImage_GetInfo(dib),
DIB_RGB_COLORS, SRCCOPY);
/* return value */
hb_retni( scanlines );
}
else
{
/* Parameter error */
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL,
HB_ERR_FUNCNAME, 6,
hb_paramError( 1 ), hb_paramError( 2 ), hb_paramError( 3 ),
hb_paramError( 4 ), hb_paramError( 5 ), hb_paramError( 6 ) );
}
}
Does that mean we have a nice "libhbfimage.a" but no one knows how to use it anymoregfilatov wrote:Ricci,Ricci wrote: One question: you use the function FI_WinDraw( ) to draw the loaded grafic.
Is there any documentation about this function or others i may need ?
Thanks for your help ...
I guess that the documentation is absent.![]()
One clarification: you have a FreeImage Documentation atRicci wrote:Does that mean we have a nice "libhbfimage.a" but no one knows how to use it anymoregfilatov wrote:Ricci,Ricci wrote: One question: you use the function FI_WinDraw( ) to draw the loaded grafic.
Is there any documentation about this function or others i may need ?
Thanks for your help ...
I guess that the documentation is absent.![]()
![]()
I cannot believe it.
Grigory,gfilatov wrote:One clarification: you have a FreeImage Documentation at
http://downloads.sourceforge.net/freeim ... ge3130.pdf
Nice sample. Thanks Grigory!gfilatov wrote: I've adapted this sample for HMG 3.0 already.
Take a look for attached working demo with project files and needed library
I'm asking your permission to include this sample in the next HMG test build.gfilatov wrote: I've adapted this sample for HMG 3.0 already.
Take a look for attached working demo with project files and needed library