Recent

Author Topic: Lazarus doesn't work with canvas.pixels command Mac  (Read 3562 times)

lukastrval

  • New Member
  • *
  • Posts: 17
Lazarus doesn't work with canvas.pixels command Mac
« on: October 16, 2014, 02:37:16 pm »
Hi, I have been programming on a mac for a while and I have now found a serious bug, that kept me from doing my work. I cannot use the canvas.pixels command it shows this error on picture. Has anyone clue what is wrong? Thanks

Simple example code which doesn't work  :
procedure TForm1.Button2Click(Sender: TObject);
var
  i,j:integer;
begin
  for i:= 0 to 23 do
    begin
      for j:= 0 to 39 do
         begin
           image2.canvas.pixels[i,j] := image1.canvas.pixels[i,j];
         end;
    end;
end;


howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Lazarus doesn't work with canvas.pixels command Mac
« Reply #2 on: October 16, 2014, 06:53:09 pm »

nitram

  • Newbie
  • Posts: 5
Re: Lazarus doesn't work with canvas.pixels command Mac
« Reply #3 on: November 28, 2014, 03:45:29 pm »
Is ther maybe a way to read out CGImageRef of a screenshot. Seem to be an OpenGL method as described at:
http://wiki.lazarus.freepascal.org/Carbon_interface_internals/de

read Headline "Screenshot taking"

nitram

  • Newbie
  • Posts: 5
Re: Lazarus doesn't work with canvas.pixels command Mac
« Reply #4 on: December 08, 2014, 09:29:44 am »
Please look at following thread:
http://forum.lazarus.freepascal.org/index.php/topic,16980.0.html

There is described the only method I found which is working on Yosemite. It's not yet perfect as after several screenshot's you get a Memory Overflow...

It's useful for a color picker with RGB readout.
« Last Edit: December 08, 2014, 09:32:24 am by nitram »

 

TinyPortal © 2005-2018