Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Niels 63 posts 119 karma points
    Mar 26, 2013 @ 12:15
    Niels
    0

    Overlay doesn't work on localhost

    I want to test the 'pro' features of ImageGen on my localhost, but the overlay function doesn't work. When I try to get the image in the browser with the following url, the overlay is not visible:

    http://localhost:47404/ImageGen.ashx?image=/media/1001/example.jpg&overlay=/images/watermark.png

    I've created the image in the mediafolder and the watermark.png is placed in /images/. It's on an umbraco version 6.0.2 and ImageGen 2.5.7

    Can somebody help me on this one?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 26, 2013 @ 12:48
    Douglas Robar
    0

    Hi, Niels,

    Just tested it locally and it worked just fine.

    Do check what you've got set in the /config/imagegen.config in the class="default" section. If you have an <ImageBaseDir> that will have an effect.

    Also, remember that the overlay image is placed at its native size on top of the resized image= image. So if your overlay is larger than the resized image and the overlay is something small in the bottom-right corner (or even in the middle if the overlay image is much larger than the resulting image) the part of the watermark overlay you expect to see might be positioned off the edge of the resized image and thus not visible. The docs talk more about this.

    Testing with a small overlay image can be helpful as you get things sorted out.

    cheers,
    doug. 

  • Niels 63 posts 119 karma points
    Apr 03, 2013 @ 17:10
    Niels
    0

    Hi Douglas,

    Sorry for my late reaction. I've checked your suggestions, but the things you mentioned were not the case. The overlay is smaller than the image and <ImageBaseDir> isn't placed in class="default". 

    Is there anything else I can check?

    Thanks,

    Niels 

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 03, 2013 @ 17:16
    Douglas Robar
    0

    Hi, Niels,

    Thanks. That removes some potential issues.

    Can you try these and let me know what does(n't) work?

    http://localhost:47404/ImageGen.ashx?image=/images/watermark.png
    http://localhost:47404/ImageGen.ashx?image=/media/1001/example.jpg&overlay=/images/watermark.png&valign=top
    http://localhost:47404/ImageGen.ashx?overlay=/media/1001/example.jpg&image=/images/watermark.png

     

    cheers,
    doug. 

  • Niels 63 posts 119 karma points
    Apr 03, 2013 @ 17:28
    Niels
    0

    Doug,

    - The first url returns the watermark like I've created. 
    - The second  url returns the image without watermark/overlay.
    - The third url returns the watermark/overlay without the image from media.

    So I hope that says something more about this issue.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 03, 2013 @ 17:45
    Douglas Robar
    0

    Hi, Niels,

    That's very odd. Any chance you could contact me through my website and we can work on this via email, sending a few files back and forth until we figure this out?

    I'd love to have your two sample images to test here.

    You can contact me at http://www.percipientstudios.com/about/contact.aspx or 'doug' at my domain.

    Thanks!
    doug. 

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 04, 2013 @ 12:21
    Douglas Robar
    101

    The solution is simple... use the correct parameter name. Sorry I didn't spot it, Niels, and just copy-n-paste'd your samples without looking closely and thus continued the mistake and wasted your time.

    The correct parameter is 'OverlayImage' not 'Overlay' as shown below. This will work correctly:

    http://localhost:47404/ImageGen.ashx?image=/media/1001/example.jpg&overlayimage=/images/watermark.png
    FWIW, I did find a typo in the ImageGen Reference Manual on page 8 where an example shows &overlay= which is incorrect; thankfully everywhere else in the reference manual and the quick start guide the full 'OverlayImage' is used when discussing the parameter and how to use it. So thanks for helping me find the typo as well. That's probably where you got the errant parameter syntax from in the first place. Again, my bad.
    cheers,
    doug. 
  • Niels 63 posts 119 karma points
    Apr 04, 2013 @ 12:26
    Niels
    0

    Thanks again for your help Douglas! I've used the line from the Reference Manual, but now it's perfect.

  • raj aryan 4 posts 24 karma points
    Aug 19, 2013 @ 20:49
    raj aryan
    0

    I have a similar issue. The overlayimage work great on my local machine but then I want to test it on my mac it does not work 

    http://mymachinename:1303/ImageGen.ashx..

    I guess this is due to licensing but I like to see what the images look like on the iphone simulator

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Aug 20, 2013 @ 09:33
    Douglas Robar
    0

    Hi, Raj,

    Yes, it's a licensing issue. You need ImageGen Professional, which is not active on the 'mymachinename' domain. If you can run as 'localhost' (with or without port numbers) or set up a hosts file to map 'mymachinename.local' to your site it will work because the Pro features are enabled for testing on all *.local and localhost domains.

    cheers, doug.

Please Sign in or register to post replies

Write your reply to:

Draft