Code Monkey home page Code Monkey logo

ls-module-imageforge's Introduction

ls-module-imageforge

LemonStand module that adds additional image manipulation options. In the future this will use an existing image manipulation library.

Installation

  1. Download ImageForge
  2. Create a folder named imageforge in the modules directory.
  3. Extract all files into the modules/imageforge directory (modules/imageforge/readme.md should exist).
  4. Done!

Usage

Add two parameters to getThumbnailPath, and image_url requests. Example:
$product->getThumbnailPath(50, 50);
to:
$product->getThumbnailPath(50, 50, true, array('mode' => 'zoom_fit'));

Technical

ls-module-imageforge's People

Contributors

highruned avatar

Stargazers

Damjan Znidarsic avatar  avatar

ls-module-imageforge's Issues

Doesn't seem to work when ImageMagick is enabled

Hi Eric,

Just tried your LS module, couldn't make it work at first.

I had ImageMagick enabled and with that config it basically renders images the size of the original.

If I change the library to force use gd or disable imagemagick in the config file, it works fine.

Fatal error

Latest LS with latest imageforge in GD leads to:
Fatal error: Call to private method Phpr_Image::create_image() from context 'ImageForge_Helper' in C:\xampp\htdocs\dh\modules\imageforge\classes\imageforge_helper.php on line 105
havent had a chance to check it with GD

Bug in target size calculation in one case

Hi Eric, back again. Found another bug, seems to be more like a typo/wrong variable use.

It happens only with a set width and height set to auto, and the source image is smaller than the target size.

also found the fix for it :)

on line 64 of imageforge_helper.php, you have

$width = $src_width > $dest_width ? $dest_width : $src_ratio;

that should be

$width = $src_width > $dest_width ? $dest_width : $src_width;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.