Hi Xavi, Thank you very much.
It works with .jpeg and also .png. I began testing with the same .png I used for all my previous .pdf tests, it's a 10 years old file, and it made the test Harbour app crash. Another such .png is pngtest.png from libpng package. This will not crash the app, but something nasty happens in the background because no printer output is created. I've been testing on Win7 with MS XPS Document Writer, win_CheckPrnDrvFormat() returns .T. All in all it seems MS .png support isn't terribly robust, even on Win7. Do you know a way to determine .jpeg and .png image dimensions? It would be nice to have it working in win_bitmapdimensions(). Brgds, Viktor On 2010 Jan 24, at 19:39, [email protected] wrote: > Revision: 13692 > > http://harbour-project.svn.sourceforge.net/harbour-project/?rev=13692&view=rev > Author: jarabal > Date: 2010-01-24 18:39:16 +0000 (Sun, 24 Jan 2010) > > Log Message: > ----------- > 2010-01-24 19:40 UTC+0100 Xavi (jarabal/at/gmail.com) > * contrib/hbwin/win_prn1.c > + Added support for printing RAW compressed formats JPEG and PNG BitMaps. > + Added new PRGs functions: win_TypeBitMap() and win_CheckPrnDrvFormat() > Example of use in the class win_BMP() > * Changes in WIN_LOADBITMAPFILE, WIN_DRAWBITMAP to support new formats. > > * contrib/hbwin/win_tprn.prg > + Extended the class win_BMP() to allow printing compressed formats JPEG > and PNG > if the printer driver allows. > + Added method CheckPrnDrvFormat( oPrn, @cErrMsg ) for check printer > driver. > + New VAR INT Type. Type of BitMap: 1 == BM, 2 == JPEG, 3 == PNG > + New VAR array DimXY. Original Image Dimensions X Y in pixels. > * New parameter aDimXY in LoadFile( cFileName, aDimXY ) > * New parameter aDimXY in Draw( oPrn, aRectangle, aDimXY ) > to introduce the original image dimensions in pixels X Y. > Some printer drivers may require the insertion of the original image > dimensions > for processing, others read from the data source and by default only > need have > aDimXY := { 1, 1 } > * Use DimXY VAR of win_BMP() in method DrawBitMap( oBmp ) of win_PRN() > > * src/compiler/hbusage.c > + Added author ID mail > > Modified Paths: > -------------- > trunk/harbour/ChangeLog > trunk/harbour/contrib/hbwin/win_prn1.c > trunk/harbour/contrib/hbwin/win_tprn.prg > trunk/harbour/src/compiler/hbusage.c > > > This was sent by the SourceForge.net collaborative development platform, the > world's largest Open Source development site. > _______________________________________________ > Harbour mailing list (attachment size limit: 40KB) > [email protected] > http://lists.harbour-project.org/mailman/listinfo/harbour _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
