45
« on: July 29, 2005, 10:29:05 AM »
Hi everybody
I have a request for the picture-upload. I hope somebody can help me. I would pay for the realisation of this request.
While uploading a picture there should be done the following checks:
1. Has the picture the required width-to-height ratio of 3:2 or 4:3? When not, the picture has to be rejected. A limit of tolerance should be definable. (DONE)
2. which is the format of the picture? Landscape format (1) or panel format (2). The format should be stored in the database (value 1 or 2) (OPEN)
3. assign the prefix according width-to-height ratio and format (OPEN)
Regarding the checks, the filename get a prefix:
32q_ (width-to-height ratio 3:2, landscape format)
32h_ (width-to-height ratio 3:2, panel format)
43q_ (width-to-height ratio 4:3, landscape format)
43h_ (width-to-height ratio 4:3, panel format)
A picture with the original name “house.jpg”, and a width-to-height ratio 3:2, and landscape format should get the filename “32q_house.jpg”. The new name is stored in the database.
(OPEN)
In the database, in the table “4images_images”, there is a filed “image_format” (defined by me).
When a picture has a width-to-height ratio of 3:2, the value „11.5 x 16 cm“ should be stored.
When a picture has a width-to-height ratio of 4:3, the value „12 x 16 cm “ should be stored.
(OPEN)
Check one (width-to-height ratio) is already done (upload.php).
Thank you for helping me.
Serge
Hallo zäme
Ich habe eine neue Anforderung an den Bildupload. Ich würde für die Realisierung der Anforderung auch etwas bezahlen.
Beim Upload der Bilder sollten folgende Checks vorgenommen werden:
1. Hat das Bild die erforderlichen Seitenverhältnisse 3:2 oder 4:3? Wenn nicht, wird das Bild abgelehnt, eine Toleranzgrenze sollte definierbar sein.
2. Welches Format weißt das Bild auf (Quer- oder Hochformat)?
3. Bestimmung Prefix für Dateiname
Je nach Resultat der Prüfungen soll der Dateiname mit einem der folgenden Prefixes versehen werden:
32q_ (Seitenverhältnis 3:2, Querformat)
32h_ (Seitenverhältnis 3:2, Hochformat)
43q_ (Seitenverhältnis 4:3, Querformat)
43h_ (Seitenverhältnis 4:3, Hochformat)
Ein Bild mit Seitenverhältnis 3:2 im Querformat mit Name „landschaft.jpg“ wird dann mit dem Namen 32q_landschaft.jpg auf dem Server und in der Datenbank gespeichert.
Weiter soll im Feld „image_format“ im Table „4images_images“ der Wert
„12 x 16 cm bei einem Bild mit Seitenverhältnis 4:3
und der Wert
„11.5 x 16 cm“ bei einem Bild mit Seitenverhältnis 3:2
gespeichert werden.
Punkt 1 hat ein Freund von mir realisiert. Die Prüfung erfolgt im Script upload.php, ab Zeile 121.. Den Script habe ich dir beigelegt.
Vielen Dank für die Hilfe.
Gruss
Serge