ScriptSpot

Forum topic · General Scripting

Image Artifacts with Bitmap and ImgTag UI controls. Why?

By rode3d · 2016-11-16

Downloads
Description

Hello guys,

I'm writing the help for a script I'm doing and I need to display a screen capture of the script's UI on the help rololut.

The problem is the image is not displaying accurately. It has some little artifacts.

Please see the image below:

The 3 images are from the same source file.

The 2 images on the left are: - top: Bitmap UI control - bottom: ImgTag UI control

Both have little artifacts.

The image on the right is displayed on a Virtual Frame Buffer and it is correct.

The problem seems to be related to image compression or something like that I guess...

Does anybody have a clue about why are the images not displaying well?

Thanks in advanced!

Comments (2)

I did not use DotNet before...

rode3d · 2016-11-22

Can you please tell me how to implement it?

Here's the code I used:


global testRollout
global testFilename = "test.jpg"
global testBmp = openBitMap(getfilenamepath (getThisScriptFilename())+testFilename)

rollout testRollout "Test UI Image Display"
(
	label lb1 "BITMAP" align:#left offset:[0,6]
	bitmap bmp1 fileName:testFilename width:179 height:270 align:#left offset:[-2,0]
	label lb2 "IMGTAG" align:#left offset:[0,16]
	imgTag bmp2 "" bitmap:testBmp style:#bmp_center width:179 height:270 align:#left offset:[0,0]
)

try (destroyDialog testRollout) catch()	
createDialog testRollout 450 640

display testBmp caption:"test"

I attach the image "test.jpg".

Attachments

fajar · 2016-11-18

are you already try use net pictureBox ?
please upload img sample that you use