Guest
Public paste!

B+ ImageAlter.transform problem data

By: a guest | Aug 25th, 2010 | Syntax: None | Size: 0.85 KB | Hits: 51 | Expires: Never
Copy text to clipboard
  1. >> Loaded a 600px by 800px PNG image.
  2.  
  3. >> Create a thumbnail
  4. {
  5.         actions: [{ scale: { maxheight=75 }}],
  6.         file: { BrowserPlusType="BPTPath", more...},
  7.         format: "jpg"
  8.         quality: 65
  9. }
  10.  
  11. >> Rotate the thumbnail right
  12. {
  13.         actions: [
  14.                 { scale: { maxwidth=75 }},
  15.                 { rotate: 90}
  16.         ],
  17.         file: { BrowserPlusType="BPTPath", more...},
  18.         format: "jpg"
  19.         quality: 65
  20. }
  21.  
  22. >> Crop the thumbnail
  23. {
  24.         actions: [
  25.                 { rotate: 90 },
  26.                 { crop: [0.08, 0.205, 0.44666666666666666, 0.405] },
  27.                 { scale: { maxwidth=75} }
  28.         ],
  29.         file: { BrowserPlusType="BPTPath", more...}
  30.         format: "jpg"
  31.         quality: 65
  32. }
  33.  
  34. >> The result of the crop is off and stretched vertically. Why?
  35.  
  36. >> If I load the same image and simply crop it, I get a good result, but the image is stretched vertically. Why?
  37.  
  38. >> When I rotate the image 90 or 270 degrees. The resulting image is completely off.