Plugin Directory

Changeset 779880


Ignore:
Timestamp:
09/29/2013 04:03:39 PM (13 years ago)
Author:
amtyera
Message:

fixed a bug in retriving an image from cache

Location:
amtythumb
Files:
11 added
3 edited

Legend:

Unmodified
Added
Removed
  • amtythumb/trunk/amtyThumb.php

    r779873 r779880  
    66
    77Author: Amit Gupta
    8 Version: 4.0.2
     8Version: 4.0.3
    99Author URI: http://article-stack.com/
    1010*/
  • amtythumb/trunk/lead-img.php

    r779873 r779880  
    4040   
    4141    //Actual image url
    42     $resized_img = getAmtyThumbCacheURL() . $pid . "_" . $w . "_" . $h;
     42    $resized_img = getAmtyThumbCacheURL() . $pid . "_" . $w . "_" . $h . getImageExtension($img);
    4343   
    4444    if($img_url_only == "y"){
     
    5151}//function end
    5252
     53function getImageExtension($imgURL){
     54    $imgInfo = @getimagesize($imgURL);
     55    if($imgInfo[2] == IMAGETYPE_JPEG){
     56        return ".jpg";
     57    }elseif($imgInfo[2] == IMAGETYPE_GIF){
     58        return ".gif";
     59    }elseif($imgInfo[2] == IMAGETYPE_PNG){
     60        return ".png";
     61    }else{
     62        return '';
     63    }
     64}
    5365
    5466function resizeImg($img,$percent,$constrain,$w,$h,$zc,$imgPath){
  • amtythumb/trunk/readme.txt

    r779873 r779880  
    55Requires at least: 2.5
    66Tested up to: 3.5
    7 Stable tag: 4.0.2
     7Stable tag: 4.0.3
    88
    99Fetch first image of a post and Resize it. Otherwise resize an image.
     
    9494== Changelog ==
    9595
     96= 4.0.3 =
     97* fixed a bug in retriving an image from cache
     98
    9699= 4.0.2 =
    97100* fixed a bug in saving all resized images in jpg by default
     
    148151== Upgrade Notice ==
    149152
     153= 4.0.3 =
     154* fixed a bug in retriving an image from cache
     155
    150156= 4.0.2 =
    151157* fixed a bug in saving all resized images in jpg by default
Note: See TracChangeset for help on using the changeset viewer.