2017 © Pedro Peláez
 

magento-module mbiz_imagecrop

Magento module which gives more capabilities in croping images.

image

monsieurbiz/mbiz_imagecrop

Magento module which gives more capabilities in croping images.

  • Monday, June 27, 2016
  • by jacquesbh
  • Repository
  • 1 Watchers
  • 2 Stars
  • 5 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Mbiz_ImageCrop

Simple helper to crop and/or resize images in Magento, (*1)

Howto Crop

<?php
$width = 100; // required argument
$height = 200; // optional argument
$imagePath = 'foo/bar.png'; // Your image is in the /media directory. In /media/foo/ precisely.

// The method of the helper
// crop($imageRelativePath, $width, $height = null);

$imageUrl = Mage::helper('mbiz_imagecrop')->crop($imagePath, $width, $height);

Howto Resize

<?php
$width = 100; // required argument
$height = 200; // optional argument
$imagePath = 'foo/bar.png'; // Your image is in the /media directory. In /media/foo/ precisely.

// The method of the helper
// resize($imageRelativePath, $width, $height = null);

$imageUrl = Mage::helper('mbiz_imagecrop')->resize($imagePath, $width, $height);

You can also set a prefix of the new image directory. The prefix is a directory. By default, our new image will be saved in /media/cache/100x200/hash/b/a/bar.png. But if you set a prefix, like:, (*2)

<?php
$imageUrl = Mage::helper('mbiz_imagecrop')->setPrefix('baz')->crop($imagePath, $width, $height);

or, (*3)

<?php
$imageUrl = Mage::helper('mbiz_imagecrop')->setPrefix('baz')->resize($imagePath, $width, $height);

The image will be saved in /media/baz/cache/100x200/hash/b/a/bar.png., (*4)

Have fun!, (*5)

The Versions

27/06 2016

dev-master

9999999-dev

Magento module which gives more capabilities in croping images.

  Sources   Download

GPL-3.0

27/06 2016

0.1.0

0.1.0.0

Magento module which gives more capabilities in croping images.

  Sources   Download

GPL-3.0