Copied to clipboard

Flag this post as spam?

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


  • Profiterole 232 posts 264 karma points
    Nov 10, 2011 @ 19:38
    Profiterole
    0

    Only base image load

    Hi, I have imagegen 2.5.7 pro installed and, sometimes, when I refresh, it seems that only the base image load, but not the transformation. If I look in the source code it's the correct image :

    /ImageGen.ashx?image=/AP/albums-photos/texte.png&&align=left&valign=center&rotate=-8&font=/AP/albums-photos/BROKEN15.TTF&fontsize=16&text=S%E9bastien,%20prof%20de%20Math%E9matique,Scie....\r\n%20Avec%20All%F4%20prof%20depuis%202011.

    But I only see (in this exemple) /AP/albums-photos/texte.png whitout rotation nor text.

    How can I correct that?

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Nov 11, 2011 @ 11:06
    Douglas Robar
    0

    Hi, 

    Thanks for the note. Is there a url where I can see this behaviour myself? That would help isolate the problem.

    cheers,
    doug. 

  • Profiterole 232 posts 264 karma points
    Nov 11, 2011 @ 14:04
    Profiterole
    0

    Hi, I opened my dev site for two days http://alloprof.test.telequebec.tv/

    It's the top banner. It picks a random teacher node and shows his/her pictures with his/her description. The picture always works, but the description misses sometimes. You'll have to refresh rapidly to see the behavior.

    Thank you for your help!

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Nov 11, 2011 @ 14:29
    Douglas Robar
    0

    Thanks, that's helpful. I'll do some research and see what I come up with.

    While I'm doing that, can you tell me where the underlying image is located that the text is drawn onto? Is it on a network or SAN drive or is it local to the webserver and website? Also, is this a single-server setup or do you have loadbalancing or shared drives involved? Anything else you can tell me about your set up?

    cheers,
    doug. 

  • Profiterole 232 posts 264 karma points
    Nov 11, 2011 @ 14:59
    Profiterole
    0

    Hi, I'm afraid I can't tell a lot about the server because I don't have access to. But as far as I now, it's a virtual server on a single machine and we're alone on it. For the image, it's on the same hard drive than the website and on the same computer.

    I just add the ~/AP folder in the reserved path in the web.config file and put the image in a  subdirectory.

    I hope this'll help! If you need anything else let me know.

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Nov 11, 2011 @ 15:00
    Douglas Robar
    0

    Hi,

    The problem is caused when the &text= parameter has text that is too large for the underlying image and it therefore won't all fit. The image you're overlaying text on is 250x56 in size.

    Most of the descriptions when rendered in your chosen font fit within that size. But some don't and those are 'empty' because the text won't fit and isn't rendered when it won't fit.

    I'd say there's also a bug that in that situation the rotation doesn't happen either and I'll log it.

    How big an image is required for the text? That's easy... just remove the ?image= and &rotate= parameters so only the text is rendered. For instance, this description creates an image that is 271x49, which is bigger than the 250x56 image you are 'drawing' the text on top of and it won't fit:

    /ImageGen.ashx?align=left&valign=center&font=/AP/albums-photos/BROKEN15.TTF&fontsize=16&text=Alexandre,%20prof%20de%20Math%E9matique,Hist....\r\n%20Avec%20All%F4%20prof%20depuis%202007.

     

    Your options include the following:

    • shorten the description text so that it fits in the available space of the image
    • make the image larger to allow more text to fit on it
    • add a width= and/or height= parameter to your imagegen request, ensuring your 'default' class allows images to be upsized

    cheers,
    doug. 

  • Profiterole 232 posts 264 karma points
    Nov 11, 2011 @ 15:10
    Profiterole
    0

    Ok thank you! I used the first option and now it works great! And now I know how to render only text.

    Simon

Please Sign in or register to post replies

Write your reply to:

Draft