Bruno.im Member Licensed User Longtime User Dec 14, 2014 #1 after creating a canvas on the panel, I save a bitmap from the canvas. Everything works fine except that the bitmap is exactly twice the size of the panel. I don't know where I am making the mistake. See the log in the attached file Thanks Attachments Test Size.zip Test Size.zip 2.7 KB · Views: 526
after creating a canvas on the panel, I save a bitmap from the canvas. Everything works fine except that the bitmap is exactly twice the size of the panel. I don't know where I am making the mistake. See the log in the attached file Thanks
stevel05 Expert Licensed User Longtime User Dec 14, 2014 #2 It's directly related to Klaus's observations here: https://www.b4x.com/android/forum/threads/some-findings-about-graphics-and-pixels.46871/ That'll explain why, I'm haven't looked at how to scale the bitmap if you want it to be the size of the panel. Upvote 0
It's directly related to Klaus's observations here: https://www.b4x.com/android/forum/threads/some-findings-about-graphics-and-pixels.46871/ That'll explain why, I'm haven't looked at how to scale the bitmap if you want it to be the size of the panel.
Bruno.im Member Licensed User Longtime User Dec 14, 2014 #3 stevel05 said: It's directly related to Klaus's observations here: https://www.b4x.com/android/forum/threads/some-findings-about-graphics-and-pixels.46871/ That'll explain why, I'm haven't looked at how to scale the bitmap if you want it to be the size of the panel. Click to expand... Thanks I'' look into it Upvote 0
stevel05 said: It's directly related to Klaus's observations here: https://www.b4x.com/android/forum/threads/some-findings-about-graphics-and-pixels.46871/ That'll explain why, I'm haven't looked at how to scale the bitmap if you want it to be the size of the panel. Click to expand... Thanks I'' look into it
Bruno.im Member Licensed User Longtime User Dec 14, 2014 #4 That was a great help now I added after all the drawing on the canvas: Panel1.Width=Panel1.Width / 2 Panel1.Height=Panel1.Height / 2 Canvas1.Initialize(Panel1) Save the Bitmap right after this and I have the perfect size in Pixels. Thanks again for pointing me to the right direction Upvote 0
That was a great help now I added after all the drawing on the canvas: Panel1.Width=Panel1.Width / 2 Panel1.Height=Panel1.Height / 2 Canvas1.Initialize(Panel1) Save the Bitmap right after this and I have the perfect size in Pixels. Thanks again for pointing me to the right direction