B4J Question Snapshot returns a bitmap that's 1 pixel bigger than the size of the node it captured.

TelKel81

Active Member
Licensed User
Always, no matter the size of the node (an Imageview. Also tried with a Pane).

My main issue is that this alters "the original" (via resizing by 1 pixel?) and also offsets it's center.

I wish I could use Imageview.GetImage but I can't because contrary to Imageview.Snapshot, Imageview.GetImage doesn't capture the output of JavaFx's effects (via setEffect method).

Any suggestion on how to solve this issue ?
 

TelKel81

Active Member
Licensed User
I'm not sure if that's considered related to this forum thread, but I found out why snapshots created with JavaFx are blurry : see here.
 
Upvote 0

TelKel81

Active Member
Licensed User
Problem solved. The bounds of the node's parent weren't whole numbers. That's what caused my blurry/offset snapshots.

Of note, I also discovered that project attribute #MainFormWidth: X doesn't necessarily equals X.
In my case :
#MainFormWidth: 800
Log(Form1.Width) -> 800.5565185546875
 
Upvote 1
Cookies are required to use this site. You must accept them to continue using the site. Learn more…