FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A problem saving linecolors ( new image ) with xImage
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
A problem saving linecolors ( new image ) with xImage
Posted: Tue Sep 24, 2019 09:47 AM
Hello,

I noticed a problem using xImage < save and paste >
painting on a image and past as a new image from clipboard, the pen-color gets lost
using past in any other programs like word it works.
I think nobody did any paintings on a image before to see the result.

paintings inside the original



The result with white lines :-)



paste in word or any other program like pixelformer works :-)





it seems to be something wrong in

METHOD Save( lAsViewed, cFile, nQuality )
METHOD Paste()


regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: A problem using xImage METHOD &lt; Save and Paste &gt;
Posted: Wed Sep 25, 2019 03:06 PM

1) Try "SaveAsViewed" and save as bmp file.
2) Can you post your code how are you drawing on the image?

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A problem using xImage METHOD &lt; Save and Paste &gt;
Posted: Wed Sep 25, 2019 07:22 PM
I used it otherwise the painting is not included

1) Try "SaveAsViewed" and save as bmp file.


The same usage but with a quality-difference

// xImage
DEFINE BUTTON OF oDlg:oBar PROMPT "Save xImage" CENTER ;
ACTION ( oImage1:Save( .T., c_path1 + "EXPORT\" + "SAVED1.JPG", 100 ), ;
MsgInfo( "saved as saved1.jpg" ) )

// TImage
DEFINE BUTTON OF oDlg:oBar PROMPT "Save Image" CENTER ;
ACTION ( oImage2:SaveImage( c_path1 + "EXPORT\" + "SAVED2.JPG", 2, 100 ), ;
MsgInfo( "saved as saved2.jpg" ) )

With the test it is possible to save with Timage or xImage
the EXE and PRG is included

usage :
1. with mouse-dblclick activate drawing
2. with mouse-dblclick stop drawing
3. after finish drawing select < new from clipboard >
using this button Your drawing is saved to the clipboard
and painted inside a new dialog.
4. next You can save the image with xImage or TImage
5. View the saved image with < show image-export >.

Download
http://www.pflegeplus.com/DOWNLOADS/XIMG2.zip



combination
You can switch between free draw and line from x to y
a line startposition is auto-connected to the end-position of free draw.



loaded from clipboard



save-results

1. save with xImage
2. show saved file ( white lines )

3. save with TImage
4. show saved file ( OK )



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion