|
|
Joined: Sep 2000
Posts: 15
Member
|
Member
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.
|
|
|
|
Joined: May 2000
Posts: 243
Member
|
Member
Joined: May 2000
Posts: 243 |
Can you show us the script? ------------------ Powered by ZCom Bulletin Boards
|
|
|
|
Joined: Sep 2000
Posts: 15
Member
|
Member
Joined: Sep 2000
Posts: 15 |
Here is the main part that reads what's in the directory. 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
|
|
|
|
Joined: Aug 2000
Posts: 13
Junior Member
|
Junior Member
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.
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
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
|
|
|
|
Joined: Aug 2000
Posts: 13
Junior Member
|
Junior Member
Joined: Aug 2000
Posts: 13 |
But it still could be done in PHP. Sorry, gotta plug for it 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.
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
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
|
|
|
|
Joined: Sep 2000
Posts: 15
Member
|
Member
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?
|
|
|
|
Joined: Sep 2000
Posts: 15
Member
|
Member
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... ------------------
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
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
|
|
|
|
Joined: Sep 2000
Posts: 15
Member
|
Member
Joined: Sep 2000
Posts: 15 |
Thanks Mark. I will try that and see if it works. Where do I get that module from? ------------------
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
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
|
|
|
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.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|