Questions tagged [imagecreatefromjpg]

18 questions
2
votes
1 answer

How to embed mjpg streams with tag without browser getting out of memory

The reason I'm using an tag for the mjpg stream is that I'm able to size the image with css. However, after letting it run for a while, the browser crashes becuase it's getting out of memory. I'm currently using…
Simon Ferndriger
  • 4,455
  • 6
  • 28
  • 53
1
vote
1 answer

ImageMagick cropping with the incorrect dimension

I tried with cropping images to 5862x367. However, it crops to 367x5862. I tried the following code: convert -crop 5862x367+0+0 +repage "/Users/ramakrishnanbalakrishnan/sites/img/test_in.JPG"…
1
vote
1 answer

Add a logo water mark diagonally to an image using PHP

I am trying to add an image watermark to a base image using PHP. I have written the code below to achieve it and am placing horizontally the watermark image centred on the base image.
Abdu ssamad
  • 81
  • 1
  • 5
1
vote
0 answers

Failed to load resource: net::ERR_FILE_NOT_FOUND in electron

I am getting this error for all of my jpg/png/svg files when running the "yarn electron ." command for my project. My react app is working perfectly, in my electron web app everything is working except for the pictures that are not loading. I have…
1
vote
1 answer

What is wrong with my javascript code or is it opencv.js?

Chrome browser crashes after some time when I use opencv.js to receiving mjpg stream from HTML image tag. I am wondering if it is a memory leak that I am causing. I have monitored the Windows Task manager (memory) and the Chrome process memory…
1
vote
0 answers

How to save an image as a TRUE grayscale using PHP?

I'm trying to save image as a real grayscale image. I believe the way I'm doing in PHP using imagefilter($im, IMG_FILTER_GRAYSCALE) or using the codes below are not saving the image as true grayscale but as RGB JPG of a grayscale image, as stated…
worisi24
  • 129
  • 3
  • 11
0
votes
1 answer

Memory errors resizing JPG with PHP

I've got Apache and PHP installed on my desktop machine and run the following PHP script to take the large images in one folder and turn them into smaller thumbnails that will be stored in a different folder. "1000.jpg" in one directory becomes the…
0
votes
1 answer

Why imagecreatefromjpeg not working for .jpg extension?

I have code for thumbnails which works great for gif, png and jpeg files but not for jpg. Please help me how to make it work for jpg. I get no errors and nothing in log file. function create_thumb($src,$dest,$desired_width = false, $desired_height =…
RoX
  • 15
  • 5
0
votes
2 answers

How can I resize an image with PHP in the following code?

I am working on an image upload and using PHP in order to save the file on server. I want to resize the image to 256px x 256px and I am using the following code but the final image is not 256px x 256px May someone offer any suggestions? …
arkitektron
  • 81
  • 1
  • 1
  • 7
0
votes
0 answers

Certificate not showing in localhost i.e. imagecreatefromjpeg() not working

I want to create certificates for users on my website but following code isn't working and only showing grey square when loaded on…
0
votes
1 answer

imagecreatefromjpeg() stopped working after upgrading to PHP 7.4 while imagecreatefrompng() and imagecreatefromgif() continue working properly

I'm having this strange with imagecreatefromjpeg() in PHP. It is returning an Uncaught Error: Call to undefined function in one of my scripts without any apparent reason. It's part of a PHP class I wrote and that I am testing. I'm using extensions…
0
votes
0 answers

Create image resource and get EXIF info without loading image twice

I have some PHP code which loads images and does some stuff to them. The images are large and slow to load (mounted SMB share), so I am trying to increase its efficiency. I'm using imagecreatefromjpeg to load an image from a JPG, and exif_read_data…
Ned Martin
  • 494
  • 6
  • 12
0
votes
0 answers

How to convert JPG to PNG on upload in WordPress (via add_image_size)?

I asked this some days ago already over here at wordpress.stackexchange.com but didn't get any response since – so I thought it would be legit to ask over here again: I am looking for a way to have one of the additional images sizes saved as PNG.…
0
votes
1 answer

Can anyone please help me in resolving this error?

My Code:

Rotating an Image

Anna
  • 3
  • 2
0
votes
1 answer

PHP function to rotate jpeg only works once

I wrote this short function which I trigger from an email link which notifies me whenever a new photo has been uploaded to my server: $fotofil = $_GET['fotofil']; $image = imagecreatefromjpeg("media/$fotofil"); $image = imagerotate($image, 270,…
aanders77
  • 620
  • 8
  • 22
1
2