How can I improve image scaling in bmp2bmp()?

This forum is for eXpress++ general support.
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How can I improve image scaling in bmp2bmp()?

#11 Post by Eugene Lutsenko »

Hans! When I pointed out the dimension in pixels I meant the resolution of the monitor, not the dimension of the files. For example, a file with a resolution of 1800x900 was generated on the 1920x1080 monitor, and the other two files on the monitor 1366x768. In this case, the dimension of the file created using bmp2bmp () is selected so that it is well displayed in the window on the monitor 1366x768 and the taskbar is visible.

Jimmy! Viewers give a good result, but they have their own interface, and I need to do it in my interface and display it in my system.

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: How can I improve image scaling in bmp2bmp()?

#12 Post by Auge_Ohr »

have you try Tip from Diego Kerejeta to use undocumented nCompress = 4 :whistle:

Code: Select all

      oBMP:Draw( oPS, { 0, 0, aIcoSize[1], aIcoSize[2] },,, 4  )
Attachments
SHRINK.ZIP
3 Picture
(871.27 KiB) Downloaded 729 times
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How can I improve image scaling in bmp2bmp()?

#13 Post by Eugene Lutsenko »

I understood what it had to be. And how to change the transparent and opaque options of the bmp2bmp() function with this in mind?
oHuge:Draw( oPS, { 0, 0, aXbpSize[1], aXbpSize[2] },,,4,GRA_BLT_BBO_IGNORE )

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: How can I improve image scaling in bmp2bmp()?

#14 Post by Auge_Ohr »

Eugene Lutsenko wrote:And how to change the transparent and opaque options of the bmp2bmp() function with this in mind?
oHuge:Draw( oPS, { 0, 0, aXbpSize[1], aXbpSize[2] },,,4,GRA_BLT_BBO_IGNORE )
NO, that are to much Parameter :!:

Code: Select all

      oBMP:Draw( oPS, { 0, 0, aIcoSize[1], aIcoSize[2] },,, 4  )
so instead of GRA_BLT_BBO_IGNORE (2) use 4
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How can I improve image scaling in bmp2bmp()?

#15 Post by Eugene Lutsenko »

4-is it a quality parameter? And what value corresponds to the maximum quality?


User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: How can I improve image scaling in bmp2bmp()?

#17 Post by Auge_Ohr »

please read about

Code: Select all

:draw( [<oTargetPS>]  , ; 
       <aTargetRect>  , ; 
       [<aSourceRect>], ; 
       [<nRasterOP>]  , ; 
       [<nCompress>]  , ;  // this Parameter
       [<nState>] )  --> lSuccess 
in German Help File
Der Parameter <nCompress> hat nur dann eine Bedeutung, wenn der Bereich <aTargetRect> kleiner als <aSourceRect> ist
Параметр <nCompress> имеет смысл только в том случае, если область <aTargetRect> меньше <aSourceRect>
Diegos Tip seems to work fine to use nCompress = 4 when Shrink Size even when Help File say it is not allowed :liar:

have fun
SHRINK_PRG.ZIP
Source
(1.08 KiB) Downloaded 722 times
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How can I improve image scaling in bmp2bmp()?

#18 Post by Eugene Lutsenko »

Everything worked out fine. I will use. Thank You, Jimmy!

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: How can I improve image scaling in bmp2bmp()?

#19 Post by c-tec »

Hello,
for complicated conversions I use the commandline of imagemagick with runshell(), is very powerful.
regards
Rudolf

http://www.imagemagick.org/Usage/windows/
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How can I improve image scaling in bmp2bmp()?

#20 Post by Eugene Lutsenko »

c-tec wrote:Hello,
for complicated conversions I use the commandline of imagemagick with runshell(), is very powerful.
regards
Rudolf

http://www.imagemagick.org/Usage/windows/
Rudolf!

This is extremely interesting. I've seen information about it. But he stopped digging in this direction when he earned bmp2bmp(). But as I understand it you need to have cygwin with the right packages. Or is Windows enough?

Post Reply