changing the size of the image that's combined with text

-hh hh at livecode.org
Tue Feb 16 08:33:44 EST 2016


When using an imagesource you are not really "combining an image with
text", but embedding a *reference to an image* into text.
If you wish to control the size of the image's display, you have to
control the size/imagedata of the image file (or referenced image).

To do this by params width and height would request to implement for
an 'old way' what's by small work already possible --- as you both
describe:
Using 'hidden' temporary images (with filenames). Works pretty well
and fast here, also changing the imagedata of the binfile itself.

Isn't it then better to use and improve (by using newest Chromium) the
'new way', the browser or browser widget, where such features and much
more are already available?

> Scott R. wrote:
> Hi Matt: The imageSource property is the one you're looking for, and
> AFAIK, using a hidden or offscreen image is the way to adjust what is
> displayed in the field. If you have an image in a field whose
> imageSource is assigned to an imported image, and you resize the
> imported image, you should see the image reference in the field update
> as well.
> It would be a good feature request for the imageSource property to
> accept width/height values. Regards, Scott Rossi
> 
> >Matt Maier wrote:
> >This is one of those times when I end up sending an hour just trying to 
> >find out if I know what keywords to search for. 
> >
> >Anywho, I want to combine images with text in a field. 
> >
> >I found the right syntax for writing html that will combine text and 
> >images: 
> ><p><img src="binfile:C:\Users\user\pics\somepic.png" char="b">lerg</p> 
> >and also that the char reference isn't necessary, so this works 
> ><p><img src="binfile:C:\Users\user\pics\somepic.png"></p> 
> >It's a bit tedious to code, since you have to escape the quotes like this: 
> >put "<p><img src=" & quote & "binfile:C:\Users\user\pics\somepic.png" & 
> >quote & "></p>" into tHTML 
> >but whatevs, it works. 
> >
> >Livecode doesn't care about the height & width information that normally 
> >go along with an <img src> tag in html. I can't find a way to control the 
> >size when using imageSource either. 
> >
> >Is there a way to adjust the size of the image that's in the text field? 
> >I'm hoping I don't have to create a temporary image of the adjusted size, 
> >put it somewhere, and then reference the temporary image instead of the 
> >actual image.





More information about the use-livecode mailing list