On Friday 21 February 2014 22:56:03 misu kun wrote:
> Hi Martin
> dose msegui support images format like png , jpg , if so , whats the
> fast way to load images on timage component ?
>
At designtime click on the ... button in objectinspector in 'bitmap' row.
At runtime use <timage>.bitmap.readfromfile(), add the necessary 
lib/common/image/mseformat*read units to uses. They use the Free Pascal 
fpimage functions which are known to be slow. It is planned to replace them 
by a faster image library.

> another thing , are there some thing like ScanLine property so i can
> access image data in a faster way .
>
In tbitmap:
"
   procedure savetoimage(out aimage: imagety);
   procedure loadfromimage(const aimage: imagety);

   property pixel[const index: pointty]: colorty read getpixel
                                                  write setpixel;
   property pixels[const x,y: integer]: colorty read getpixels
                                                  write setpixels;
   property scanline[index: integer]: pointer read getscanline;
   function scanhigh: integer; //max index in scanline[0]
"
imagety is
"
 imagety = record
  monochrome: boolean;
  bgr: boolean;
  size: sizety;
  length: integer;  //number of longword
  pixels: plongwordaty;
 end;
"
In tmaskedbitmap:
"
   class procedure freeimageinfo(var ainfo: imagebufferinfoty);
   procedure loadfromimagebuffer(const abuffer: imagebufferinfoty);
   procedure savetoimagebuffer(out abuffer: imagebufferinfoty);
"
imagebufferinfoty is
"
 imagebufferinfoty = record
  image: imagety;
  mask: imagety;
 end;
"
If you need to create image pixelbuffer yourself use gui_allocimagemem() and 
gui_freeimagemem().

Martin

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to