We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42802
    • 96 Posts
    Sebastian Zahn | ingroove.uy Reply #31, 10 years, 6 months ago
    Today update de Resizer version and reinstall Image+ , and........... WORKS LIKE A CHARM!

    smiley

    Thanks!!!!!!

    Quote from: jgrant at Mar 12, 2014, 02:02 PM
    Yes, I noticed this myself a few days ago. I think there are two problems.

    The first is, the new version of phpThumb that came with MODX 2.2.12 may have a bug which causes it not to size thumbnails correctly in this case. (pThumb just passes off the input image and parameters to either phpThumb or Resizer to do the actual work). I haven't looked into this one really.

    But Resizer doesn't work correctly either. It sizes the image to w x h, then tries to crop a sw x sh rectangle image out if it. But it should be the opposite order: crop first, then resize. Anyway, this'll be fixed in the next version. If you want you can replace core/components/resizer/model/resizer.class.php with this version and it should work. Make sure you change the 'Use Resizer' system setting to Yes and clear out any cached images so that they'll be regenerated.
      • 32678
      • 290 Posts
      I'm posting about curious and really frustrating issue encountered with pthumb in the hopes that there's a simple solution. In short, pthumb significantly changes image saturation. This references usage on a photography website, so these effects are unacceptable.

      This is on a MODX 2.3.3 site on a Skytoaster box, which supports ModX well. PhpThumbsUp evidently has a bug after MODX 2.1 or so, leaving phpthumbof or pthumb for this sort of image management. Pthumb's features and flexibility are preferable between the two, but after tinkering with settings and filters for a couple hours I resorted to phpthumbof, which reproduces images faithfully as far as saturation / contrast / etc.

      Any ideas on what's happening? I'd much refer the performance of pthumb but just cannot abide its effects on image appearance.
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        I can't say I have encountered this problem. Could you tell us more about how you are calling pThumb and did you have resizer enabled?
          Patrick | Server Wrangler
          About Me: Website | TweetsMODX Hosting
          • 32678
          • 290 Posts
          Quote from: AMDbuilder at Feb 26, 2015, 09:07 PM
          I can't say I have encountered this problem. Could you tell us more about how you are calling pThumb and did you have resizer enabled?

          I had Resizer enabled at first and observed the aforementioned issue while it was. When I started messing with filters I disabled it. Otherwise, straightforward usage as far as I know...
          Ex: <img src="[[*imageFile:pthumb=`w=944&q=95&zc=1`]]" />
            • 35150 ☆ A M B ☆
            • 191 Posts
            My guess is that your input images have an embedded color profile other than sRGB, right? Resizer dosen't add profiles to thumbnails, in an effort to keep them as small as possible. (Some CMYK profiles are upwards of a megabyte!)

            It does make an attempt to properly convert the image to sRGB when generating a thumbnail, but it can only do it if ImageMagick on the server supports profile conversion, and some installs don't (*cough* MODX Cloud *cough*). Otherwise the profile gets stripped. In order for it to work you need ImageMagick >= 6.5.9 and it needs to have been compiled with the lcms delegate. You can check with this command in a shell: convert -list configure | grep DELEGATES
            You should see lcms listed.

            Using profiles other than sRGB typically isn't a good idea on the web. Up until fairly recently only a few browsers supported them. Now most desktop ones do; don't know about mobile. Older browsers simply ignore them and visitors see the same muted colors you noticed. Search for 'browser color profile support' and look at some of the links. Most monitors can't display gamuts much larger than sRGB anyway, so Adobe 1998, Prophoto, etc. aren't doing you any favors on the web unless you cater to graphics professionals with wide-gamut displays.

            When you're saving images for the web, generally you want to convert them to sRGB then not embed the profile (sRGB is assumed). That ought to avoid this problem altogether. This article is old, but has some good background information: http://www.gballard.net/psd/saveforwebshift.html.
              Extras :: pThumbResizerimageSlimsetPlaceholders
              • 32678
              • 290 Posts
              Quote from: jgrant at Feb 26, 2015, 09:43 PM
              My guess is that your input images have an embedded color profile other than sRGB, right?

              No, I'm a pro photographer and comfortable with profiles. I save for web from PS CS5 as sRGB.

              I discovered the pthumb issue by comparing instances of the same image file side by side -- one straight from the image directory and the other processed through pthumb. This baseline was used when experimenting with filters, also.
                • 42802
                • 96 Posts
                Sebastian Zahn | ingroove.uy Reply #37, 9 years, 7 months ago
                You can use straight use of pthumb without filters and apply filters with JS.

                Do you know Canman Library? I think you will love this, i´m a photographer too and love it smiley

                Check this out: http://camanjs.com/examples/

                You have presets or you can create your own filters.
                This is an example i made myself to test the library: http://ingroovelab.com/CANMAN/

                Cheers.

                Sebastián.


                Quote from: wpicotte at Feb 26, 2015, 09:57 PM
                Quote from: jgrant at Feb 26, 2015, 09:43 PM
                My guess is that your input images have an embedded color profile other than sRGB, right?

                No, I'm a pro photographer and comfortable with profiles. I save for web from PS CS5 as sRGB.

                I discovered the pthumb issue by comparing instances of the same image file side by side -- one straight from the image directory and the other processed through pthumb. This baseline was used when experimenting with filters, also.
                [ed. note: zzseba last edited this post 9 years, 7 months ago.]
                  • 32678
                  • 290 Posts
                  Quote from: zzseba at Feb 26, 2015, 10:09 PM
                  You can use straight use of pthumb without filters and apply filters with JS.

                  Do you know Canman Library? I think you will love this, i´m a photographer too and love it smiley

                  Check this out: http://camanjs.com/examples/

                  You have presets or you can create your own filters.
                  This is an example i made myself to test the library: http://ingroovelab.com/CANMAN/

                  Cheers.

                  Sebastián.

                  That's pretty cool - may play with it, but I don't want to use filters at all. Once I export from PS I'm done with image correction and definitely shouldn't be forced into because of a add-on.
                    • 42802
                    • 96 Posts
                    Sebastian Zahn | ingroove.uy Reply #39, 9 years, 7 months ago
                    I think that´s the best thing you can do.

                    Cheers.

                    Quote from: wpicotte at Feb 26, 2015, 10:17 PM
                    Quote from: zzseba at Feb 26, 2015, 10:09 PM
                    You can use straight use of pthumb without filters and apply filters with JS.

                    Do you know Canman Library? I think you will love this, i´m a photographer too and love it smiley

                    Check this out: http://camanjs.com/examples/

                    You have presets or you can create your own filters.
                    This is an example i made myself to test the library: http://ingroovelab.com/CANMAN/

                    Cheers.

                    Sebastián.

                    That's pretty cool - may play with it, but I don't want to use filters at all. Once I export from PS I'm done with image correction and definitely shouldn't be forced into because of a add-on.
                      • 32678
                      • 290 Posts
                      Still struggling with this pthumb issue. I re-installed pthumb on a local instance of ModX 2.3.3 using MAMP Pro.

                      1) Resizer is not functioning. The error log references the image and says"Could not load Resizer class.".

                      2) The image path isn't altered, but I have pthumb cache enabled. There is a writable assets/image-cache folder.

                      PHP v5.6.2 and Imagick in installed, running ImageMagick ImageMagick 6.8.9-7.

                      I've tried using pthumb as both an output and a snippet. Running it as a snippet, the image is output but not resized / cached. Here's the snippet call:

                      [[!pthumb?
                      &input=`[[*imageFile]]`
                      &options=`w=500`
                      &toPlaceholder=`thumb`
                      ]]
                      <img src="[[+thumb]]" />