osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Image Manager enhancement. Now you can generate only missing images.

This is a discussion on Image Manager enhancement. Now you can generate only missing images. within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi everybody, I made a quick mod to the Image Manager that adds an extra option to generate only missing ...

      
  1. #1
    Member Luxoria's Avatar
    Join Date
    Sep 2010
    Location
    VA, USA
    Posts
    58
    Rep Power
    26


    3 out of 3 members found this post helpful.

    Default Image Manager enhancement. Now you can generate only missing images.

    Hi everybody, I made a quick mod to the Image Manager that adds an extra option to generate only missing images. Currently if you upload new MOPIC images you would either have to the thumb them manually in a program like photoshop or regenerate all your images server wide. (using the image regen option when Browsing products does not regen MOPICS)

    The mod scans the DYNAMIC_MOPICS_BIGIMAGES_DIR (images_big/) directory and looks to see if there are corresponding image files in DYNAMIC_MOPICS_PRODUCTS_DIR and DYNAMIC_MOPICS_THUMBS_DIR. If either one of those images are missing the mod regenerates the whole images set.

    There are only two modified files:

    admin/images_regen.php
    admin/includes/languages/english/images_regen.php

    and one new file

    admin/includes/languages/english/images/buttons/button_regenerate_missing.gif

    Attached in a ZIP are those three files and a step by step to add the mod manually.

    For me it works great! Let me know if you have any questions.

    To Do: Figure out how to use the button template and make a nice looking button.

    To Do: Add image compression control. Some images look really bad at the default 75 JPG compression and it would be nice to have the ability to use 99 JPG compression for select images.


    *edit* forgot to remove a debug echo. found around line 840: remove 'echo 'go! <br>';'
    Attached Files Attached Files
    Last edited by Luxoria; 02-04-2011 at 03:22 AM.

  2. #2
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    Thanks for sharing.
    75% is usually fine for thumbnails but it does depend on image type. It's pretty easy to change though and you'd be hard pressed to notice any differences in quality with compression beyond 85%. Given the resultant file size, I recommend this as a maximum but solely up to you and how slow you're prepared your site to be!
    Relevant line of code:
    PHP Code:
    $phpThumb->setParameter('q'80);  //maintain high quality for product image 
    Hosting plans with installation, configuration, contributions, support and maintenance.

  3. #3
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    I will merge this into the core ... thank you for giving your code back to the community.

    I have a button generator that can create the buttons for me ... There is a .psd file in the admin/images folder if you ever need it ...

    Perhaps we could move the image compression setting into the Mopics Settings?

    Regards,
    pgmarshall
    _______________________________

  4. #4
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    Nice Job Luxoria! That is a great because I just spend all week converting 650 images into product size and thumbnail size. Won't be the last time for me but this module will definitely help!!!

  5. #5
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Exclamation Re: Image Manager enhancement. Now you can generate only missing images.

    Quote Originally Posted by pgmarshall View Post
    Perhaps we could move the image compression setting into the Mopics Settings?
    Given the widespread deplorable use of images (size, proportions), I deliberately didn't make it too simple to change. In general, people have a hard enough job only putting in one dimension, uploading a sensible sized image and using a 'quality' source image. This is in addition to poor (or no) image naming convention.
    Give 'em enough rope... (in the words of The Clash)



    [Yesterday, I ran through a manual file size compare and consolidation of approx. 2,000 images, due to exactly the above reasons]
    Hosting plans with installation, configuration, contributions, support and maintenance.

  6. #6
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    To be really pedantic, any source image that is JPG (or PNG?) has already lost any inherent quality, being lossy file formats. For many, it's a case of never mind the quality, feel the width (quantity) - witness rising megapixel counts in consumer cameras/phones. LZW compressed TIF, or better FIF (fractals) would be far better for photographic images, if more widespread use was supported in browsers/programs.

    Last edited by ridexbuilder; 02-04-2011 at 04:29 AM.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  7. #7
    Member Luxoria's Avatar
    Join Date
    Sep 2010
    Location
    VA, USA
    Posts
    58
    Rep Power
    26


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    Awesome, I am glad to have contributed. There really has only been about three images out of a few hundred that I had to change the JPG compression to 99, it was night shot of a red glowing product against a white wall. Right now my compression is set manually in phpthumb.class to 90. A bit high, but I have difficult products when it comes to photography.

    @blackhawk, I am working on better affiliate tracking and reporting if you want the beta code. I even installed the ability to allow affiliates to upload banners. I am posting this here in because you blocked your PMs.

    edit* yeah , I saw the PSD file for the buttons. I just could not figure out how to make the button wider, so I made a quicker so I can move on to my next project.
    Last edited by Luxoria; 02-04-2011 at 04:40 AM.

  8. #8
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Thumbs up Re: Image Manager enhancement. Now you can generate only missing images.

    ... it was night shot of a red glowing product against a white wall...
    A recipe for artefacts
    Hosting plans with installation, configuration, contributions, support and maintenance.

  9. #9
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    @bh - The image functionality has been in the source for a while! Don't waste any more time resampling your images! ... Luxoria's mod to the module helps you find the ones you are missing which is excellent as it will keep the server overhead down!

    @Luxoria - I am interested in the affiliates stuff you are working on as it is an area of v2.5 which needs some work. Not many people have used the affiliate stuff in the past so it probably all needs updating and fixing to work properly - I have done a load of tidying up (eg. rollover help buttons, etc.) but I have not spent any time fixing the core functionality yet ... r868 - oscmax2 - Project Hosting on Google Code

    Regards,
    pgmarshall
    _______________________________

  10. #10
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: Image Manager enhancement. Now you can generate only missing images.

    and anyway I can help or test with the affiliate functionality, let me know. I am in desperate need for a stable solution but happy.

Page 1 of 2 12 LastLast

Similar Threads

  1. Missing images
    By apexrg in forum osCommerce 2.2 Installation Help
    Replies: 6
    Last Post: 03-18-2009, 09:42 AM
  2. Let's See What We Have Here Image Missing!
    By m82492 in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 09-19-2008, 11:14 PM
  3. SSL image missing on secure pages
    By basnyd in forum osCmax v2 Customization/Mods
    Replies: 4
    Last Post: 11-06-2007, 03:54 PM
  4. Missing Product Images
    By driwashsolutions in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 12-08-2006, 02:13 PM
  5. Products image missing popup image
    By islander in forum osCmax v2 Installation issues
    Replies: 7
    Last Post: 08-10-2005, 12:30 PM

Bookmarks

Posting Permissions

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