Bildescriptet croppe til dimensjon
Bug #436251 reported by
Thomas Misund
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
studentersamfundet.no |
Fix Released
|
Medium
|
Paal Braathen |
Bug Description
Bildescriptet vårt (imageResize.php) kan i dag resize bilder etter maksbredde eller makshøyde. Hvis begge parameterne er gitt resizer scriptet etter den hardeste restriksjonen.
Bygg ut scriptet til å kunne spytte ut bilder som er resizet til den letteste restriksjonen, og croppet til å også passe til den høyeste.
Eksempel: Scriptet får beskjed om å spytte ut et bilde på 600x400 px. Originalbildet er 800x1200 px. Scriptet vil da først resize til 600x900px, og deretter croppe vekk de øverste 250px og de nederste 250px.
Related branches
lp:studentersamfundet-web
Approved
for merging
into
lp:studentersamfundet-web/production
- Thomas Misund: Approve
Changed in studentersamfundet-web: | |
milestone: | none → studentersamfundet.no1.1 |
importance: | Undecided → Medium |
Changed in studentersamfundet-web: | |
assignee: | oyvinbak (olivaq) → Thomas Misund (misund) |
Changed in studentersamfundet-web: | |
assignee: | oyvinbak (olivaq) → Paal Braathen (paalbra) |
Changed in studentersamfundet-web: | |
status: | Incomplete → Fix Released |
To post a comment you must log in.
Fikset!
La til cropping som aktiveres ved parameteret crop i urlen, pluss et alternativ for å bestemme offsettet om en ønsker det.
eks: studentersamfun det.no/ imageResize. php?pic= bilder/ nyheter/ 549.jpg& maxwidth= 300&maxheight= 100&crop= 1 studentersamfun det.no/ imageResize. php?pic= bilder/ nyheter/ 549.jpg& maxwidth= 300&maxheight= 100&crop= 1&offsety= 0 studentersamfun det.no/ imageResize. php?pic= bilder/ nyheter/ 549.jpg& maxwidth= 300&maxheight= 100&crop= 1&offsety= 60 studentersamfun det.no/ imageResize. php?pic= bilder/ nyheter/ 549.jpg& maxwidth= 300&maxheight= 100&crop= 1&offsety= -0 studentersamfun det.no/ imageResize. php?pic= bilder/ nyheter/ 549.jpg& maxwidth= 300&maxheight= 100&crop= 1&offsety= -60
*cropping, offsetet settes til midten
http://
*cropping, offset settes fra toppen (i pixler):
http://
http://
*cropping, offset settes fra bunn (i pixler):
http://
http://
Oppdaterte http og https, så er klart til å brukes!