How can I improve image scaling in bmp2bmp()?
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
How can I improve image scaling in bmp2bmp()?
If you reduce the resolution of the image in some image file viewer, you get a much higher quality image than is obtained using bmp2bmp(). How to solve this problem? I'm already thinking of replacing bmp2bmp() with an external image scaling program run from the command line. For example, ImageMagick for cygwin (http://rus-linux.net/MyLDP/consol/Image ... nsoli.html)
Re: How can I improve image scaling in bmp2bmp()?
can you upload a Sample to test it ?
you can try GraBitBlt() instead of o:Draw()
you can try GraBitBlt() instead of o:Draw()
Code: Select all
GraBitBlt( oTargetPS, oSourcePS, aTargetRect, aSourceRect )
greetings by OHR
Jimmy
Jimmy
- 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()?
Send a sample program or an example image?
Re: How can I improve image scaling in bmp2bmp()?
Original Image and BMP2BMP() ImageEugene Lutsenko wrote:Send a sample program or an example image?
greetings by OHR
Jimmy
Jimmy
- 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()?
Thank You, Jimmy!
No difference between "opaque" and "transparent" options bmp2bmp() visually I have not noticed. I send 4 files: original, compressed with two variants of bmp2bmp() and compressed to the same size (1366 x 768) using Microsoft Office Picture Manager. The difference in quality is obvious. This difference plays a role because the compressed file is displayed on a monitor of limited dimension. In the application folder of the Eidos system is saved and the original.
Maybe there is some program that can be accessed from the command line with parameters that can qualitatively reduce the resolution of graphic files. I asked a friend of the developer from Belarus how difficult it is to do. He said he'd do it today. In cygwin, too, there is such a possibility: https://www.ibm.com/developerworks/linu ... ry/l-graf/. But the problem is that this cygwin build weighs 137 MB in the archive, instead of 80 MB, which I now use.
This program from Belarus is now in the process of debugging. I tested it. The scaled images are of very high quality
No difference between "opaque" and "transparent" options bmp2bmp() visually I have not noticed. I send 4 files: original, compressed with two variants of bmp2bmp() and compressed to the same size (1366 x 768) using Microsoft Office Picture Manager. The difference in quality is obvious. This difference plays a role because the compressed file is displayed on a monitor of limited dimension. In the application folder of the Eidos system is saved and the original.
Maybe there is some program that can be accessed from the command line with parameters that can qualitatively reduce the resolution of graphic files. I asked a friend of the developer from Belarus how difficult it is to do. He said he'd do it today. In cygwin, too, there is such a possibility: https://www.ibm.com/developerworks/linu ... ry/l-graf/. But the problem is that this cygwin build weighs 137 MB in the archive, instead of 80 MB, which I now use.
This program from Belarus is now in the process of debugging. I tested it. The scaled images are of very high quality
- Attachments
-
- 1.zip
- (921.44 KiB) Downloaded 1001 times
Re: How can I improve image scaling in bmp2bmp()?
hm ... i do not see Difference in Files do you mean small Fonts
i wonder why you make a big (1800 x 900 Pixel) File when you know it have to be Shrink to 1366 x 699 Pixel
i wonder why you make a big (1800 x 900 Pixel) File when you know it have to be Shrink to 1366 x 699 Pixel
greetings by OHR
Jimmy
Jimmy
- 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()?
I sent the wrong files. Hurried. Now send it to you
- 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()?
Hey, Jimmy!
Send 3 file: SWOTDiagrCls0001-06.jpg (1920x1080), SWOTDiagrCls0001-06_Scaled1.jpg (1366x768 obtained with bmp2bmp()) and SWOTDiagrCls0001-06_scaled2.jpg (1366x768, obtained with the help of the program from Belarus). The difference in the quality of the last two files is obvious.
You're asking me why I'm making files with different resolutions. Many users Eidos system (http://aidos.byethost5.com/map3.php) have a screen resolution lower than 1920x1080 on the computers available to them. For them to display on the screen you need a scaled file. And I always create a quality 1920x1080 file and write to the folder for these files so that they can be used in publications and reports. If the user has a screen at 1920x1080, then I do not form the scaled files, but show the original quality.
The program from Belarus for image scaling will be included in the Eidos system and will be publicly available. The quality of its work is the same as the graphic viewers. But it is started with the Run Shell() command with the parameters that are in the text file. It's convenient. Now this program is in the process of fine-tuning.
Send 3 file: SWOTDiagrCls0001-06.jpg (1920x1080), SWOTDiagrCls0001-06_Scaled1.jpg (1366x768 obtained with bmp2bmp()) and SWOTDiagrCls0001-06_scaled2.jpg (1366x768, obtained with the help of the program from Belarus). The difference in the quality of the last two files is obvious.
You're asking me why I'm making files with different resolutions. Many users Eidos system (http://aidos.byethost5.com/map3.php) have a screen resolution lower than 1920x1080 on the computers available to them. For them to display on the screen you need a scaled file. And I always create a quality 1920x1080 file and write to the folder for these files so that they can be used in publications and reports. If the user has a screen at 1920x1080, then I do not form the scaled files, but show the original quality.
The program from Belarus for image scaling will be included in the Eidos system and will be publicly available. The quality of its work is the same as the graphic viewers. But it is started with the Run Shell() command with the parameters that are in the text file. It's convenient. Now this program is in the process of fine-tuning.
- Attachments
-
- 1.rar
- (1.31 MiB) Downloaded 991 times
Re: How can I improve image scaling in bmp2bmp()?
i see now what you mean
Xbase++ only use GDI Function so Result when Shrink will lose Pixel.
while you use Text/Font in your Image you can see bad Result.
external Viewer like IrfanView or even M$ Windows 10 Photo Apps will give better Result
i use System associated App with ShellExecuteA API Function instead of Runshell()
Xbase++ only use GDI Function so Result when Shrink will lose Pixel.
while you use Text/Font in your Image you can see bad Result.
external Viewer like IrfanView or even M$ Windows 10 Photo Apps will give better Result
i use System associated App with ShellExecuteA API Function instead of Runshell()
Code: Select all
lSuccess := DllCall( "SHELL32.DLL", DLL_STDCALL, ;
"ShellExecuteA", APPDESKTOP() :GetHWND(), "open", cPath+cFile, ;
cParameter, CURDIR(), SW_NORMAL )
DO CASE
CASE lSuccess > 32
Retvar := .T.
greetings by OHR
Jimmy
Jimmy
Re: How can I improve image scaling in bmp2bmp()?
Irfanview says for your files:Eugene Lutsenko wrote:Hey, Jimmy!
Send 3 file: SWOTDiagrCls0001-06.jpg (1920x1080), SWOTDiagrCls0001-06_Scaled1.jpg (1366x768 obtained with bmp2bmp()) and SWOTDiagrCls0001-06_scaled2.jpg (1366x768, obtained with the help of the program from Belarus). The difference in the quality of the last two files is obvious.
You're asking me why I'm making files with different resolutions. Many users Eidos system (http://aidos.byethost5.com/map3.php) have a screen resolution lower than 1920x1080 on the computers available to them. For them to display on the screen you need a scaled file. And I always create a quality 1920x1080 file and write to the folder for these files so that they can be used in publications and reports. If the user has a screen at 1920x1080, then I do not form the scaled files, but show the original quality.
The program from Belarus for image scaling will be included in the Eidos system and will be publicly available. The quality of its work is the same as the graphic viewers. But it is started with the Run Shell() command with the parameters that are in the text file. It's convenient. Now this program is in the process of fine-tuning.
The resolution is
SWOTDiagrCls0001-06.jpg (1800x900),
SWOTDiagrCls0001-06_Scaled1.jpg (1366x699) and
SWOTDiagrCls0001-06_scaled2.jpg (1366x768).
best regards
Hans
Hans