It is currently Wed Jul 08, 2020 12:42 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Done] 5.71 Multiple GrabDrawingImage problem
PostPosted: Wed Feb 05, 2020 2:00 pm 
Offline
User
User

Joined: Fri Dec 06, 2013 11:57 am
Posts: 51
Hi,

if I use StartDrawing on an ImageOutput and I use 2 GrabDrawingImage to get 2 parts of the drawing area to copy them on other place in the same drawing area, both IDs seem to get the same on MacOS (Catalina 10.15.3), where on Windows 7 it works as expected.

Smallest possible example:
Code:
grid = CreateImage(#PB_Any,2000,400,24,RGB(255,255,255))
If StartDrawing(ImageOutput(grid))
  FrontColor(RGB(192,192,192))
  Box(0,0,1999,99)
  FrontColor(RGB(0,0,0))
  Box(0,100,1999,99)
  DrawingMode(#PB_2DDrawing_Transparent)
  For num = 1 To 64
    px = 5 + (num-1) * 20
    py = 10
    DrawText(px,py,Str(num))
  Next num
  FrontColor(RGB(255,255,255))
  DrawingMode(#PB_2DDrawing_Transparent)
  For num = 1 To 64
    px = 5 + (num-1) * 20
    py = 110
    DrawText(px,py,Str(num))
  Next num
  For num = 1 To 64
    px = 5 + (num-1) * 20
    py = 10
    one = GrabDrawingImage(#PB_Any,px,py,20,20)
    py + 100
    two = GrabDrawingImage(#PB_Any,px,py,20,20)
    py + 100
    If one <> 0
      DrawImage(ImageID(one),px,py)
      FreeImage(one)
    EndIf
    py + 100
    If two <> 0
      DrawImage(ImageID(two),px,py)
      FreeImage(two)
    EndIf
  Next num
  StopDrawing()
  SaveImage(grid,"icontest.bmp",#PB_ImagePlugin_BMP)
EndIf


On Windows 7 I get the following image:
Image


But on MacOS i get:
Image

You can see, that the third line should have grey background, but gets the black background ob the 2nd captured image.

Maybe a cache/memory/id problem?

Greetings, hoerbie


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.71 Multiple GrabDrawingImage problem
PostPosted: Sun Feb 23, 2020 11:12 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14065
Location: France
Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye