Timage lazarus / 39-Graphics ---------------------------------------------------------------------- T-bear · 2010-08-18 10:11 How do i change the picture of Timage? Thanks! ---------------------------------------------------------------------- BlueIcaro · 2010-08-18 13:14 Quote from: T-bear on August 18, 2010, 12:11:52 pmHow do i change the picture of Timage? Thanks! Image1.Picture.LoadFromFile('MiFile.bmp'); Also you can load from resource or clipboard /BlueIcaro ---------------------------------------------------------------------- ecitoyen · 2010-08-22 16:43 Just a question... Which file format are accepted? I check with a gif image and it's not work!!! ---------------------------------------------------------------------- BlueIcaro · 2010-08-22 17:09 Quote from: ecitoyen on August 22, 2010, 06:43:36 pmJust a question... Which file format are accepted? I check with a gif image and it's not work!!! Try to read this: http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Image_form ats /BlueIcaro ---------------------------------------------------------------------- theo · 2010-08-22 17:13 Quote from: ecitoyen on August 22, 2010, 06:43:36 pmI check with a gif image and it's not work!!! Afaik GIF reading is supported in SVN Version. It works here (Lazarus 0.9.29 r26813M FPC 2.4.0 i386-linux-gtk 2 (beta)) ---------------------------------------------------------------------- ecitoyen · 2010-08-23 21:45 Thanks a lot... I read your link on the wiki... I want to put an image in the background of a form in my program with Timage in the IDE... We can choose picture from various format, and the IDE convert the format picture to bmp... and write it a project file... after many uses of this way... I just ask to me if my program can load his own background from a file. It's work very good with bmp file... The trick here...in this way you can build a program that giving us the opportunity to choose another image file, convert it to a bmp file, saving this new image in the file of the old file name. If you are building a software system with many program that using an image as background(in a form)... we can draw at the outside an image's collection as theme... As linux-Mint say... With freedom came to Elegance... Maybe, other ways exists... but for now... as i'm a newbie with Lazarus... it's OK. Thanks... ---------------------------------------------------------------------- ecitoyen · 2010-08-23 22:10 TO DO LIST... 1. We have to establish the quantity of programs in your system... For example...10 programs 2. We have to know size of the form for each program (to let to your artistic comunity... the spec for each picture) 3. Determine the filename for each image Program 1: Image1.bmp for ex. Program 3: Image3.bmp for ex. ... Program 10: Image10.bmp for ex. Put it in a table record   filename  Vertical  Horizontal 1        Image1.bmp  400        600 3        Image3.bmp  723        599 etc... In the program 1... always use: LoadFromFile('...Image1.bmp') 3... always use: LoadFromFile('...Image3.bmp') etc... -------------------- TO THE DESIGNER... For a theme... draw picture in regards image spec'(Image1: 400 X 600) etc... Put all the 10 images in a zip file... THEME1.zip ------------------------------- When you download this zip file... decompress in a general directory ...THEME/THEME1/ ----------------- Create a program to select themes... by checking subdirectory in the Theme Directory... When a user select a theme, the program will copy the file Image1.bmp in the directory of the Program 1... etc... It's not so hard to understand... I hope... The world shall be beautiful... ---------------------------------------------------------------------- alejol0 · 2010-09-26 12:54 TImage has some properties that can help you. For example, Proportional:=True makes you picture use the maximum TImage area possible with no defrmation. Autosize:=True is opposite, makes the TImage adjust the size to the size of the image. Stretch can expand the image to fill the area of the TImage. And you can make the TImage of the same size that your form. With ZOrder you can send your image to back and act as a from background. With Anchors you can make your image resize automatically wen your frm resizes.