Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

JPEG in Delphi

Posted on 1997-03-18
5
1,008 Views
Last Modified: 2013-11-19
I'm trying to make a program, which browses through
my collection of holidayphoto's, which I scanned myself.

I saved these pictures in JPG format to save disk space.

Could somebody help me, how to view them.
Is there a freeware sourcecode for it, because
ImageLib is just not it for me, because
I don't want to spent money on it, and I
don't like the screens that it gives.
0
Comment
Question by:orionltd
5 Comments
 

Expert Comment

by:fonta
ID: 1334906
It's possible, if you only want to view those pictures in the screen, to put an Ole Container control (you can find it in the System tab of the component palette) and then you can make a table with only the filename (string field) and some other fields containing other information about your images (what you want). In response on an event you can use the method LoadFromFile of the Olecontainer control and the name of the file could be given by the appropriate field on your table ... if you are really interested I can send you a piece of code as an answer ok ?

my e-mail is
fonta@telnetwork.it
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1334907
There are some FREEWARE jpeg components available at the
Delphi Super Page...if all you want to make is a kind of
slide show, then these would be perfect for you...the URL is:

   http://www.cdrom.com/pub/delphi_www/

0
 
LVL 3

Expert Comment

by:mheacock
ID: 1334908
Were you able to download a few JPG components?  Did they do
what you were looking for?
0
 

Author Comment

by:orionltd
ID: 1334909
Sorry Fonta had a better answer
0
 

Accepted Solution

by:
jaimi earned 100 total points
ID: 1334910
To view a Jpeg from within your delphi program, you can
download the following file:

http://carbohyd.siobc.ras.ru/torry/VCL/GRAPHICS/NVIEWLIB.ZIP

You would then call this function:
function NViewLibLoad(FileName : PChar; ShowProgress: BooLean):hbitmap; Stdcall;

Assuming you had an openfile dialog named opendialog1, a
button named openbutton, and a timage named image1 then
you could view it like this:

procedure tform1.openbuttonclick(sender : tcomponent);
var hbm : hbitmap;
begin
    if opendialog1.execute then begin
        Image1.Picture.Bitmap.Handle:= NViewLibLoad('fig.jpg',         FALSE);
    end;
end;
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question