Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can certainly rely on CSS for newsletters - just certain properties only, and inline. We run a very successful set of campaigns and the newsletters look just fine for everyone.</p> <p>It's not a problem that we have a folder on our web server where there are a few thousand small modified images. </p> <p>We can't change the layout, well, because that's what some important people want - and the important people pay me a decent amount of money to make what they want happen. Yeah, I could raise a big stink about it and probably convince them otherwise, but if I could conversely spend a few hours and get it to work, why not?</p> <p>FWIW, I did manage to get this done with GD - wasn't as complicated as I thought - will post the script if anyone else needs it:</p> <pre><code>// get image $url = 'myimage.jpg'; $src = imagecreatefromjpeg($url); // dimensions (just to be safe, should always be 185x127 though) $src_wide = imagesx($src); $src_high = imagesy($src); // set white padding color $clear = array('red'=&gt;255,'green'=&gt;255,'blue'=&gt;255); // new image dimensions with right padding $dst_wide = $src_wide+8; $dst_high = $src_high+8; // New resource image at new size $dst = imagecreatetruecolor($dst_wide, $dst_high); // fill the image with the white padding color $clear = imagecolorallocate( $dst, $clear["red"], $clear["green"], $clear["blue"]); imagefill($dst, 0, 0, $clear); // copy the original image on top of the new one imagecopymerge($dst,$src,0,8,0,0,$src_wide,$src_high, 100); // store the new image in tmp directory $pth = 'tmp/myimage.jpg'; imagejpeg($dst, $pth, 100); // free resources imagedestroy($src); imagedestroy($dst); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload