Recent

Author Topic: JPEG Unit  (Read 22785 times)

RidgewayM

  • Newbie
  • Posts: 2
JPEG Unit
« on: January 30, 2005, 02:33:08 am »
Hi All,
Does Delphi's JPEG unit work in Lazarus?

Sorry if this question is a dumb one, but although I have used Delphi since it was first released, I am not familar with Lazarus at all; however, I am impressed with what I see so far.

Well done to those that are reponsible for this project

Regards.

http://www.addmap.com

Anonymous

  • Guest
JPEG Unit
« Reply #1 on: February 03, 2005, 12:55:40 pm »
You can find jpeg unit in lazarus and use it as you wish. As far as i remember it looks similiar to one in VCL.

RidgewayM

  • Newbie
  • Posts: 2
JPEG Unit
« Reply #2 on: February 04, 2005, 04:08:18 am »
Well that's good news.

I have this GIS mapping project written in Delphi (the back-end is Delphi the front-end PHP):

http://www.addmap.com/HospitalMap.html
http://www.addmap.com/LibraryMap.html

I want to port the back-end to run in a Linux environment and I don't want to use Kylix. I was going to rewrite it in C but am considering porting it to Lazarus. Any tips from members of this forum will be greatly appreciated.

Thanks

Nisbo

  • New Member
  • *
  • Posts: 19
JPEG Unit
« Reply #3 on: March 19, 2005, 01:49:19 pm »
Quote from: "Anonymous"
You can find jpeg unit in lazarus and use it as you wish. As far as i remember it looks similiar to one in VCL.


Sorry if I try to insert unit jpeg I get the error that lazarus cant find unis jpeg  :idea: whats wrong ?

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
JPEG Unit
« Reply #4 on: March 19, 2005, 11:16:38 pm »
You probably need to install JPEG4Lazarus. It's located in your lazarus/components directory. Just install the package.

I KNOW however that some JPEGs don't work.

Nisbo

  • New Member
  • *
  • Posts: 19
JPEG Unit
« Reply #5 on: March 20, 2005, 07:11:02 am »
OK there is something in this directory, but why its not installed with lazarus ?
To install JPEG I need a step to step instruction --> click here, click here, choose this, click here

Sorry I tried to read all the inscructions but its english and i am from germany, i am alble to understand english but it last longer and isnt so easy than german (for me)

Anonymous

  • Guest
JPEG Unit
« Reply #6 on: October 14, 2005, 03:39:44 pm »
I just installed Lazarus v0.9.10 beta on SuSE 9.3 and made a first quick jpeg-test:

1. I had to log in as root (as Lazarus was installed in root's space by Yast and Lazarus so far only support static linking of packages and therefore need to be able to recompile itself when packages are installed).

2. I opened Components->Configure Installed Packages and choosed JPEGforLazarus from the list of available packages and then hit the button Save-and-Rebuild-IDE and waited until Lazarus had restarted.

3. I opened the example imageviewer project under /lib/lazarus/imgviewer. It compiled just fine and could load a jpeg.

4. I tried the usual:
var jpg: TJPegImage;
    jpg:=TJPegImage.create;
   jpg.LoadFromFile(filename);
   Image1.Picture.Assign(jpg);
   jpg.Free;
...and it worked just fine.
(I moved the lazjpeg declaration from the implementation uses to the uses for the whole unit.)

5. One thing I don't get is:
Under Project->Compiler Options->Inherited the JPEGforLazarus is included in the list in this example application, BUT when I try to start a fresh project myself it is missing and there seems to be no way to add it and the lazjpeg unit can therefor not be used.

6. As a workaround I guess one could copy the imageviewer project and use it as a starting point for other projects.

Hope this is of some help to those who are completely stuck.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
JPEG Unit
« Reply #7 on: October 14, 2005, 04:31:37 pm »
Ad1. when not logged in as root, a lazarus rebuild creates a ~/.lazarus/bin with the new lazarus exe.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
JPEG Unit
« Reply #8 on: October 14, 2005, 05:01:54 pm »
Ad 5. Project -> Project Inspector -> Add -> New requirement -> Package name.

Anonymous

  • Guest
JPEG Unit
« Reply #9 on: January 29, 2006, 08:15:31 am »
u need to check if ur project is using lazJPEG in its dependencies its all in the readme.txt in the jpeg component folder :P

 

TinyPortal © 2005-2018