Save dialog to Jpg RESOLVED

Save dialog to Jpg RESOLVED

Postby Silvio.Falconi » Thu Nov 14, 2024 10:13 am

is it possible to save part of a dialog in a jpg file?
Last edited by Silvio.Falconi on Fri Nov 15, 2024 9:27 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Save dialog to Jpg

Postby nageswaragunupudi » Fri Nov 15, 2024 2:49 am

Code: Select all  Expand view  RUN
oDlg:SaveAsImage( cFileJpg, { top, left, bottom, right } )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Save dialog to Jpg

Postby Silvio.Falconi » Fri Nov 15, 2024 9:21 am

nageswaragunupudi wrote:
Code: Select all  Expand view  RUN
oDlg:SaveAsImage( cFileJpg, { top, left, bottom, right } )



I made
oBar:AddItem( "Salva", "save_48.bmp", {|| SalvaDialog(nType,oDlg) }, {||.t.}, .f., "" )

Function SalvaDialog(nType,oDlg)
local cFileJpg1:= "TopTen_Lotto_Ritardatari.jpg"
local cFileJpg2:= "TopTen_Lotto_Frequenti.jpg"
If nType=1
oDlg:SaveAsImage( cFileJpg1, { 0, 0, oDlg:nbottom, oDlg:nright-100 } )
else
oDlg:SaveAsImage( cFileJpg2, { 0, 0, oDlg:nbottom, oDlg:nright-100 } )
endif
return nil


Problems

when the nType=1 save good

Image



when the ntye =2 save bad

Image

if the coordinates are the same how is it possible that in the second type it also prints the menu to the side and starts a black area to the right and below?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Save dialog to Jpg

Postby Silvio.Falconi » Fri Nov 15, 2024 9:27 am

Now I correct with this

[img] Function SalvaDialog(nType,oDlg)
local cFileJpg1:= "TopTen_Lotto_Ritardatari.jpg"
local cFileJpg2:= "TopTen_Lotto_Frequenti.jpg"
local oRect:= oDlg:GetCliRect()
If nType=1
oDlg:SaveAsImage( cFileJpg1, { oRect:nTop, oRect:nLeft, oRect:nbottom, oRect:nright-100 } )
else
oDlg:SaveAsImage( cFileJpg2, { oRect:nTop, oRect:nLeft, oRect:nbottom, oRect:nright-100 } )
endif
return nil[/img]
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests