Thread: tim thumb

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default tim thumb

    conversation on image handler thread got me thinking about this. so I spent an hour investigating.

    simple resizing? well maybe. I can see downsides but....

    if anyone wants to have a play on a test server give it a go. basically although there is much more potential in TT all this does is step into timthumb from zen_image(). So all it does is create scaled images. But in some ways what else do most users need. Well, actually it sharpens as well because I was having a play with that.
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: tim thumb

    Sounds promising, I'll give it a try. Right now I am building a brand new site so this is a good time to test new add-on's

  3. #3
    Join Date
    Apr 2010
    Posts
    319
    Plugin Contributions
    0

    Default Re: tim thumb

    works a treat,

    thanks niccol

    bn

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: tim thumb

    Well, I'd want to have a bit more of a think about it before I even described it as a mod or add-on. This is really really un-tested but as has been said it is kind of promising way of simply adding image scaling to Zen.

    I guess before it became a mod I'd want to put an additional image uploader in there. But that is just taking a chunk out of my other mod in progress 'Image Scaler'.

    Hmmm, we'll see. But thanks a lot for your comments :-)

  5. #5
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: tim thumb

    It works, but I have some things to solve

    • I have an existing gif file as a product image. this image has some transparent parts in it so i can see the background. Using timthumb the picture loses it's transparency.

    • Another product has no image attached (for now), so it shows the default no_picture.gif. The image shows fine on the product page, but doesn't show in the new product side-box, and new listing on the main-page


    The site (d e s i g n 7 5 dot nl) is currently in maintenance mode, but you van see the images in the side-box
    Last edited by Design75; 1 Mar 2012 at 12:48 PM.

  6. #6
    Join Date
    Apr 2010
    Location
    Melksham, UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: tim thumb

    Cool. You've gone a step further than me by putting it in to zen_image, which makes a lot of sense.

    The only major issue to address really is the aspect ratio. AIUI, if you specify a width *and* height in timthumb you will get a squashed image rather than a cropped image. Cropping is a feature in tt and an admin page to specify the crop position might help. Or one could just specify the width; does Zen Cart allow you to put nulls in the image parameter settings in the admin page for width and height?

    Designers expect a fixed aspect ratio on images which doesn't always match the supplied product images. I have spent far too many hours manually cropping and resizing images before upload, let alone cutting out masks and cleaning up backgrounds.

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: tim thumb

    I haven't played a lot but I think that that is what the zc=2 does in the parameters. Or that is what the documents say anyway. It is a proportional scaling setting. I am happy to be shown to be wrong but it worked when I tried it. Now the images do not squish.

    As i say, my total knowledge of TimThumb ( apart from stripping it out of some commercial templates in the past ) is 30 minutes late last night so I do not claim to be an expert!

    Yes Zen allows null settings on the width and height.

    Yes, there are interesting potentials about cropping in general. I know what you mean about spending hours with client images In another discussion we talked about how to deal with this. I guess the admin settings could be 'crop to fit the box' 'scale and then pad with margins to fit the box' and 'scale to fit the box and don't bother about margins'

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: tim thumb

    Regarding the transparency issue. I think that that is just another setting I need to add but I need to look at the TimThumb documents.

    Hmmm, the no product image thing. Again not sure but what happens if you try using a .jgp immage for this? What I am guessing is that it it an issue with gif images? If the world was under my control I would flush gif images out the waste disposal chute, but that is just me And I do know that people get gif images from their suppliers, so do not always have control.

  9. #9
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: tim thumb

    @ design75
    Try this for me. Change tt/timthumb.php

    Code:
    if(! defined('PNG_IS_TRANSPARENT') ) 	define ('PNG_IS_TRANSPARENT', FALSE);
    change to :

    Code:
    if(! defined('PNG_IS_TRANSPARENT') ) 	define ('PNG_IS_TRANSPARENT', TRUE);
    I know that that is pngs rather than gifs but I'd be interested to see what happens

  10. #10
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: tim thumb

    It is already set to TRUE, but the value is for PNG files not for gif, so I am going to change the transparent gif into a png. I will report later to let you know the result

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Rule of Thumb
    By adb34 in forum General Questions
    Replies: 3
    Last Post: 15 Apr 2015, 09:52 PM
  2. Tim's Froogle/Gbase Tool Won't FTP
    By oldcountrymall in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 3 Jul 2006, 08:55 PM
  3. Tim Kroeger's version of SEFU
    By jayson.gurney in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 2 Jun 2006, 04:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg