Previous Thread
Next Thread
Print Thread
Rate Thread
#101734 11/16/2000 3:49 PM
Joined: Sep 2000
Posts: 15
Member
Member
Offline
Joined: Sep 2000
Posts: 15
I have created an image indexing program, but I can only get the images to be one size on the thumbnail page. My horizontal picture look ok, but my vertical pictures are smooshed. The program scans the directory and prints all the pictures that it finds. Is there a way to find out the image info automatically without entering it into another file and then reading the info from that file? Any help would be appreciated.

Sponsored Links
#101735 11/16/2000 10:55 PM
Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
Can you show us the script?

------------------
Powered by ZCom Bulletin Boards

#101736 11/16/2000 11:26 PM
Joined: Sep 2000
Posts: 15
Member
Member
Offline
Joined: Sep 2000
Posts: 15
Here is the main part that reads what's in the directory.

Code
code:

Any help would be appreciated. If you want to see the the script working, go HERE . Thanks.

This message has been edited by tigerarch on November 16, 2000 at 10:30 PM

#101737 11/17/2000 2:45 AM
Joined: Aug 2000
Posts: 13
Junior Member
Junior Member
Offline
Joined: Aug 2000
Posts: 13
It's possible in PHP. To do it in perl you'd need to rip the data out of the file itself, and check the format first.

#101738 11/18/2000 3:50 PM
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
He's not trying to do it in PHP, Dufus.
Show us the first part of the file. Like, the first 17 lines.

------------------
UBBDEV Moderator
OCCUPATION: Programmer, webmaster.

Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop

Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.

Sincerely,
MasterMind

Sponsored Links
#101739 11/19/2000 12:08 AM
Joined: Aug 2000
Posts: 13
Junior Member
Junior Member
Offline
Joined: Aug 2000
Posts: 13
But it still could be done in PHP. Sorry, gotta plug for it [Linked Image]

There are licensing problems with GIFs and JPEGs, so you may not be able to, but I'm pretty sure there's an image module floating around somewhere.
You might have to limit yourself to PNGs for a while, though. Or use uncompressed GIFs.

#101740 11/19/2000 2:52 AM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
You could download and install the Image::Size module from CPAN. Then just do:


use Image::Size;

my ($width, $height) = imgsize('path/to/your/file.gif');


--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101741 11/20/2000 8:51 AM
Joined: Sep 2000
Posts: 15
Member
Member
Offline
Joined: Sep 2000
Posts: 15
Mark, isn't that something I have to install on the server? I can't do that since I don't host my own site. That sounds like a pretty good idea though. Is there any other way?

#101742 11/20/2000 12:12 PM
Joined: Sep 2000
Posts: 15
Member
Member
Offline
Joined: Sep 2000
Posts: 15
I wish I could use PHP, but I don't think my host allows it. Maybe its time for a new host...

------------------

#101743 11/20/2000 12:42 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
That module may very well be one of the ones that you can download and just keep the pm file in a directory of your choice, without needing to install on the server.

You'll need to create a directory called Image (Case sensitive!) and place Size.pm (also case sensetive) in there.

Make sure the script accessing it has

use lib '/whatever/path/to/Image';

in it.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
Sponsored Links
#101744 11/20/2000 1:47 PM
Joined: Sep 2000
Posts: 15
Member
Member
Offline
Joined: Sep 2000
Posts: 15
Thanks Mark. I will try that and see if it works. Where do I get that module from?

------------------

#101745 11/20/2000 3:19 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
http://cpan.perl.org/

you can search for it there.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)