Skip to main content
-1 votes
1 answer
79 views

I have to get the width and height of hundreds of images. I got this php to work on one image: <?php list($width, $height) = getimagesize($_SERVER['DOCUMENT_ROOT'] ."/path/file.jpg"); ?&...
pitzki's user avatar
  • 317
1 vote
2 answers
103 views

here is what i have so far. i am not sure if it's accurate, and even if it is, is there a better way to do this? i want to check images and determine if it's tall, wide, square, or kind of square. ...
leoarce's user avatar
  • 549
0 votes
0 answers
75 views

I want to see the sizes of images within a directory. For this purpose I do $ for file in *.jpg; do jpegtopnm $file | pnmfile; done Then I can see jpegtopnm: WRITING PPM FILE stdin: PPM raw, 960 by ...
Alex's user avatar
  • 1
-1 votes
1 answer
207 views

I check if the image is vertical or horizontal. If it is horizontal, I rotate it: @IBOutlet private weak var img: UIImageView! img.image = file.image let imageSize = file.image?.size let imgWidth ...
iosSwift's user avatar
0 votes
0 answers
29 views

I have this simple function that I use to display images on a website (due to mixed content) but it doesn't work for this particular one. How to view it? Code: <?php $remoteImage = "http://...
Adam's user avatar
  • 11
0 votes
0 answers
428 views

I am trying to run the below code in w3schools try it php, but I get this error. what did I miss? $file="https://www.w3schools.com/html/pic_trulli.jpg"; function resize_image($file, $w, $h, $...
kmboon's user avatar
  • 21
0 votes
1 answer
911 views

I am using PHP's getimagesize() function to get the height/width/type from an image URL. Currently, for a jpg file, $type is returning 2. How can I get it to return the actual mime type instead? <?...
user19103974's user avatar
1 vote
0 answers
205 views

I want to get the image size in kb and MB from the user. Like, I have one image, and the image size is 1Mb so I want to compress this image size according to the size given by the user. I used this ...
ZIBRAN KHAN's user avatar
1 vote
0 answers
264 views

I have a 403 error when trying to use the PHP function getimagesize on nginx based web server: list($imageWidth, $imageHeight) = getimagesize($imagesSource['Main']); Where $imageSource['Main'] is ...
London Smith's user avatar
  • 1,662
0 votes
1 answer
301 views

I am having trouble showing images correctly in my application. I wish the picture would retain its original proportions. I display picture in the AppBar, I am using Picasso to download images, but ...
oyasumi's user avatar
  • 41
1 vote
1 answer
129 views

I'm trying to write an Joomla plugin to add width and height tag to each <img> in HTML file. Some image file names are Persian, and getimagesize faces error. The code is this: @$dom->...
Hossein's user avatar
  • 21
2 votes
0 answers
177 views

i am using php getimagesize to set width and height columns in the database. works fine with with every image except some GIFs shot by an Iphone camera(Live Photos). in that case the width and height ...
PIRATE FIFI's user avatar
0 votes
1 answer
101 views

getimagesize () command in the For loop and the Foreach loop gives the same erroneous result. I just couldn't fix it. What is the reason for this, how can I fix it? I take the picture files from the ...
Abuzer Kadayif's user avatar
0 votes
1 answer
2k views

I am trying to get the size from an remote image with the native php function getimagesize from an absolute URL. I am using PHP 7.3, here is the code: $fichier = 'http://mydomain/images/image.jpg'; $...
Wylls's user avatar
  • 121
0 votes
1 answer
224 views

Code: $urli = 'https://st.quantrimang.com/photos/image/2020/02/20/Zalo-bat-tim-quanh-day-1.jpg'; $size = getimagesize($urli); echo $urli.'.</br>Size:'; echo $size[0].'</br>'; If run in ...
ThuanIT's user avatar

15 30 50 per page
1
2 3 4 5
14