Duotone – prevent activation of “horizontal” layout (always default to vertical)

  • Author
  • #444893


    Try forcing the width without adding the width and height attributes, just add the ?w=650 so your code looks like this:

    <img src="http://lolebrity.net/wordpress/wp-content/uploads/2010/01/Kermit-is-Kermispated.jpg?w=650" class="size-full wp-image-798" title="Kermit is Kermispated"   alt="Kermit sez it ain't easy being green"    />

    see what happens.

    If that doesn’t work, then try deleting the image tag only. Save the document, then paste the img tag back without the “?w=xxx” part. Save again. See if that does it.



    Deleting it gave me this:

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 235

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: ‘http://www.assoc-amazon.com/e/ir?t=raincoast-20&l=ur2&o=1’ is not a valid JPEG file in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 235

    Warning: imagesy(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 237

    Warning: imagesx(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 239

    Warning: imagecolorat(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 251

    Warning: imagecolorat(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 252

    Warning: imagecolorat(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 253

    Warning: imagecolorat(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 254

    Warning: imagecolorat(): supplied argument is not a valid Image resource in /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php on line 255

    Warning: Cannot modify header information – headers already sent by (output started at /home/lolebrit/public_html/wordpress/wp-content/themes/monotone/functions.php:235) in /home/lolebrit/public_html/wordpress/wp-includes/pluggable.php on line 868

    Not exactly ideal.



    Isn’t it usually me who lectures people about hijacking threads? Oh well. Crankiness has its privileges, I guess.



    boy, there’s some stuff going on with that theme… I wonder why it’s using GD, it seems it’s creating images on request… just a guess.

    I went through your blog and those pages were the images overflow, have the same “?w=560” qs… again, it might be a bug in the theme.

    To me, it seems like a bug… you might want to contact the author and let him know about this.

    Sorry I couldn’t be of much help.



    Thanks. I’m going to take next weekend and learn to hack the Duotone theme, which I like better, so it works on an external blog. Apparently it takes SOME doing! If I kill the blog, rest assured I have your email and will come screaming for help.



    Sure thing. Also, as soon as I finish this project I’m working on, I’ll download your theme and look under the hood to see if it’s something I can fix, or find a way around the problem without you having to do anything to the .php files.



    Thanks. I found the best guide to fixing it, and want to take a shot at it myself. Let me run my tweaks by you before you go to that work.



    @rain: I resized an image in Picnik, uploaded and inserted it to my test blog (with Duotone on), no complication whatsoever. But then again, the image was from my scanner/computer; maybe the ones you’ve used include some info that isn’t wiped out by Picnik like it would be if edited in Photoshop. Could you give me the link to where you got the Kermit pic from?

    Another thing: I noticed in the source code of your pages that the insertion option wasn’t always the same – one of the images was “large”, another one “fullsize” and so on. In Monotone these have no effect; maybe it’s not the same with Duotone, so I’ll have to experiment and see if these make any difference.

    @devblog: see here for the background to the story (with which I suppose you’re familiar). The latest complication is that a width qs now shows up in the source code even when you delete it in the html editor (except in flexible-width themes). What’s worse, the number isn’t the actual width of the inserted image but the supposedly maximum for the theme you’re using (which again is often wrong, as I’ve shown in this post).

    I sent a ticket re this two weeks ago, and got this reply:

    “This is intentional. If there is a problem with image quality, please send us a copy of the original images as an attachment and also send us the URL where you are using the image on your site.”

    I sent them a link to a demonstration post I prepared, sent them the image, gave them extra details too, – and I’m still waiting for a reply. Starsquid also sent a ticket a on this couple of days after me, asked about it in the forum yesterday, and was told by staff that this query is on queue…



    The latest complication is that a width qs now shows up in the source code even when you delete it in the html editor

    Yeah, that’s why I suggested to “force” the width to 650 in the qs… I don’t know if she tried that, though.

    I too thought that probably the photo would contain some info that it would be taken by the software, but when I downloaded the image the basic info reflected its correct width: 650px. So I don’t understand what’s the deal.

    Deleting the image gave rain those nasty warnings, that means the theme coudln’t parse the image – which is kind of weird too – to get its dimensions…

    Strange theme this is…

    When I finish the project I’m working on, I’ll download it and check under the hood to see what’s going on… Now, I’m curious.



    Ok, I just got word from Noel (the designer of Duotone) – apparently my issue was that it was a bug in private blogs, so Noel kindly fixed the bug for me. Now I’m curious as to see what the maximum width for an image would be without triggering the horizontal layout. I’m going to experiment.


    @rain: I think I pinned it down (and Picnik is probably innocent).

    Like Monotone, selecting size option, changing width, etc., have no effect. The theme bg is confined to 840px wide, so above that you get downsizing and no color along the sides. If the image is less than but close to 840, you only get two very narrow strips of course, so my original 800px suggestion is a good limit. So what’s the problem? Some smart guy set it so that you don’t get the sides if the width or the height of the uploadeed file is above 840!

    For the sake of others who might read this, I’m also reminding that for a centered image you need to set the alignment to None before inserting.


    PS I’ll send a ticket re this.


    I thought I’d better run a few more tests before sending the ticket, and it turns out I hadn’d pinned it down after all… So here’s what happens (in both Monotone and Duotone): 840 is the limit for landscape-shaped images only; for square or portrait-shaped ones it’s 560!

    So, for a decent border along the sides, my suggestion is resize images (before uploading) to no wider than 800px if landscape-shaped, to no wider than 520px if square or portrait-shaped.



    AHA! Now I don’t feel so guilty about diverting this into a discussion of an independently-hosted blog. That is useful to EVERYONE.

    Much, much appreciated, guys.


    @rain: That’s the whole point of the forum, isn’t it?

    (And once you publish some new posts, please let me know if my suggestion is confirmed.)



    I got a new one up. Didn’t resize it at all, it’s been 500 px all the way through. I’ll use picnik to resize another one later tonight and test.



    I think it’s a bug in the downloaded version of duotone. The width passed in the querystring tells the theme to resize the image to 560px (that’s why the use of GD).

    I uploaded a photo, which is 683px wide, to one of my wp.com hosted blogs and duotone resized it to 560… so yeah, the logic the programmer used was that if an image’s height was greater than its width, use 560, else use 840… and if that’s not working on your blog, it’s possible because of a bug.

    You might want to email the creator and bring this to his attention, he might have a better idea of why that’s happening and help you as he did the OP.



    I’m using Monotone on that blog, because if I use Duotone, the entire thing goes haywire and none of the images display. The Duotone theme is essentially unusable on external blogs without major, major overhaul.




    Please don’t post the same question THREE TIMES.

The topic ‘Duotone – prevent activation of “horizontal” layout (always default to vertical)’ is closed to new replies.