Plugin Directory

Changeset 779873


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

fixed a bug of saving resized images as jpg in cache

Location:
amtythumb
Files:
11 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • amtythumb/trunk/amtyThumb.php

    r779799 r779873  
    66
    77Author: Amit Gupta
    8 Version: 4.0.1
     8Version: 4.0.2
    99Author URI: http://article-stack.com/
    1010*/
  • amtythumb/trunk/amtyThumbAdminFunction.php

    r779794 r779873  
    3636    }
    3737    //echo $img;
    38     $img_uri = getAmtyThumbPluginPath() . "testimage.jpg";
    39     $img_url = getAmtyThumbPluginURL() . "testimage.jpg";
     38    $img_uri = getAmtyThumbPluginPath() . "testimage";
     39    $img_url = getAmtyThumbPluginURL() . "testimage";
    4040    //echo $img_uri;
    4141    $starttime = time();
  • amtythumb/trunk/amtyThumbAdminPg.php

    r779794 r779873  
    166166</form>
    167167</div>
    168 
     168</div>
    169169<hr />
  • amtythumb/trunk/lead-img.php

    r779794 r779873  
    3232   
    3333    //To save image on disk
    34     $img_uri = getAmtyThumbCachePath() . $pid . "_" . $w . "_" . $h . ".jpg";
     34    $img_uri = getAmtyThumbCachePath() . $pid . "_" . $w . "_" . $h;
    3535   
    3636    if($pid == -1 || !file_exists($img_uri)) { //for specific image resizging, caching is not required. it'll be saved with -1 pid
     
    4040   
    4141    //Actual image url
    42     $resized_img = getAmtyThumbCacheURL() . $pid . "_" . $w . "_" . $h . ".jpg";
     42    $resized_img = getAmtyThumbCacheURL() . $pid . "_" . $w . "_" . $h;
    4343   
    4444    if($img_url_only == "y"){
     
    164164        if($thumb != ''){
    165165                if($imgInfo[2] == IMAGETYPE_JPEG){
    166                     imagejpeg($thumb, $imgPath , 100);
     166                    imagejpeg($thumb, $imgPath . ".jpg" , 100);
    167167                }elseif($imgInfo[2] == IMAGETYPE_GIF){
    168                     imagegif($thumb, $imgPath);
     168                    imagegif($thumb, $imgPath . ".gif");
    169169                }elseif($imgInfo[2] == IMAGETYPE_PNG){
    170                     imagepng($image_p, $imgPath, 9);
     170                    imagepng($image_p, $imgPath . ".png", 9);
    171171                }
    172172        }
  • amtythumb/trunk/readme.txt

    r779799 r779873  
    55Requires at least: 2.5
    66Tested up to: 3.5
    7 Stable tag: 4.0.1
     7Stable tag: 4.0.2
    88
    99Fetch first image of a post and Resize it. Otherwise resize an image.
     
    9494== Changelog ==
    9595
     96= 4.0.2 =
     97* fixed a bug in saving all resized images in jpg by default
     98
    9699= 4.0.1 =
    97100* fixed a bug in returning cached image path
     
    145148== Upgrade Notice ==
    146149
     150= 4.0.2 =
     151* fixed a bug in saving all resized images in jpg by default
     152
    147153= 4.0.1 =
    148154* fixed a bug in returning cached image path
     
    152158* offline cache - You can rebuild cache for all or particular posts directly through option page. It saves client response time for posts which are not cached yet.
    153159* HTML design fix amty thumb option page.
    154 
    155 = 3.2.0 =
    156 * improved quality of PNG and GIF files resizing
    157 
    158 = 3.0.1 =
    159 * fixed a bug when it tries to resize invalid or broken images
    160 
    161 = 3.0.0 =
    162 * performance improvement
    163 * You can see broken cached images from amty Thumb admin page.
    164 * first image will be cached whenever the page gets published.
Note: See TracChangeset for help on using the changeset viewer.