Forum > Graphics

bitmap, load and save.

(1/2) > >>

marmin:
Problem!


  form1.canvas.brush.color:= clBlack;
  BitMap1 := TBitMap.create;
  Bitmap1.Loadfromfile('test1.bmp');  
  bitmap1.canvas.moveto(1,1); bitmap1.canvas.lineto(4,4);
  bitmap1.savetofile('test2.bmp');

gives'Acces Violation' run-time error , when writing.
If I omit the pixel edit , things work perfectly.
Could this be anything to do with a DDB? help.

Lightning:
What version of Laz/FPC are you using ?

marmin:
ohoh.. This is a Lazarus bug.

I have just tested the same code in Delphi 6 and it's working fine.

marmin:
ah i d-loaded the latest snapshot and it's fixed ! nice work. cuz I was working on a nice Lazarus Icon Editor-
 
bitmaps still give strange color conversion results.

- what is the format of an Icon for Linux?
- how can I convert tcolor to tfpcolor?

Nisbo:
mmmm sorry but it doesnt work on my site

Image1.Picture.Bitmap.SaveToFile('TestBitmap.bmp');

TestBitmap.bmp is a black picture :(

Navigation

[0] Message Index

[#] Next page

Go to full version