@redhatlookMay 30.2007 — #You want to resize 2048x1536 image with just setting 269x202 dimensions within img tag? No.. ? that is so evil idea ? ? ? because browser will still download the original large image in the situation when just a small image is needed.
@toplisekauthorMay 30.2007 — #thank you. Probably this is reason that I have problem with download (in Mozilla is seen this as it would be broken image for second).
I have code in javascript like: [code=php] document.getElementById('selimage').innerHTML = "<img alt='My products' width='269' height='202' src='" + image + "'>"; [/code]
Is possible to read from particular directory images and show in Javascript variable?
How to do correct code?
I have some code like: [code=php] //set new height $size = 150; $src = imagecreatefromstring ($data); $width = imagesx($src); $height = imagesy($src); $aspect_ratio = $height/$width;
@redhatlookMay 30.2007 — #I don't know why you are using javascript there, but if you want to display small images something like thumbnails gallery use script like this...
@redhatlookMay 30.2007 — #If you do not specify the 'b' flag when working with binary files, you may experience strange problems with your data, including broken image files and strange problems with rn characters.
@redhatlookMay 30.2007 — #It seems that $size is a new height of the image so in your case 202 and width will be based on image dimension. Play around with it