Bug #15898
closedCropscale fails, if one dimesion has already right size
0%
Description
Gropscale fails, if
- width has already the right size and height mus be reduced
or
- height has already the right size and widthmus be reduced
Solution:
Change class.t3lib_stdgraphic.php line 2156 from
if ($wh_noscale && !$params && !$frame && $newExt==$info2 && !$mustCreate) {
to line
if ($wh_noscale && !$data['crs'] && !$params && !$frame && $newExt==$info2 && !$mustCreate) {
(issue imported from #M3162)
Files
Updated by Ingmar Schlecht over 18 years ago
Hi Bernhard,
this is another one you might want to look at.
If not, just unassign the bug again.
cheers
Ingmar
Updated by Bernhard Kraft over 18 years ago
Ok ....
What I did:
- Wondering what cropscale is and where it is documented.
- Looked into the source and wondered how it should work (*100/200 ?????)
- Found this strange URL in google: http://www.typo3.com/documentation/mailing-lists/dev-list-archive/thread/98345/?tx_maillisttofaq_pi1%5Bmode%5D=1&tx_maillisttofaq_pi1%5Bpointer%5D=10
note that it is on typo3.com but shows typo3.org :) :) - Read the source again and understood it now (100c ... not width_c_cropwidth !)
- Got amazed about how fine this works - meaning 100c-100 ... with percent after c !
- Noticed that the reporter of this bug and provider of the fix (you Stefan) is the same as the person who developed the code
- Settled that the fix is ok and in no kind will break other things.
So my final conclusion is:
I send a diff with your suggestion to the core list and will commit it to CVS (As I have taken care of the GIFBUILDER somehow ...)
We (meaning initially you :) MUST (!!) write documentation for this feature !
A feature which isn't documented anywhere will never get used.
So write a a little textfiles containig the changes in TSref ... you will have to change the
text for the width/height field of IMAGE .... be sure to explain it in an easily understandable form (the posting in .dev is a little bit confusing) and probably even give 1 or 2 example !
thx Stefan for this contribution !!
Updated by Stefan Geith over 18 years ago
1) I would like to add Documentation, but I don't know where -
The text of TSref / imgResource / width/height should be changes;
(I will upload a Text-FIle here with suggested changes, but
cropscale isn't easy to explain - at least in english for non native speakers...)
2) Have you seen this: http://www.geithware.de/test/cropscale.html ?
There are some examples, on how it works;
3) Maybe you are able to change the descriprion to make it clearer ?