"Parameter is not valid" error when resizing remote image - imageresizer

Image using the remotereader plugin to resize images. The following image will render correctly in the browser when accessed directly but when access via the remotereader gives a 500 server error.
URL: http://images.britishpathe.com/?id=22797&num=55&size=thumb
GIST of the error page: https://gist.github.com/19nine78/5857810

This message means the byte stream is not a valid image.
If you download the image and attempt to resize it as a local image, do you get the same result?
If yes: you know that the error is due to an irregularity in the jpeg file.
If no: then it's likely that a network-level issue, such as a reverse proxy, is modifying the byte stream and preventing the image from being parsed properly.

Related

Images automation using seleinum

Image not available content is displayed instead of images. But the image path is displayed properly.
We have compared the image path for image not available and the path for images displayed properly. The path is same and there is no difference.
We have tried to find the issue in network section in browser but there is no error.
Is there any idea to find the issue using selenium?

How to check the file format on an image to run through Tensorflow style transfer demo

Situation
I'm trying to use my own images in the Tensorflow Style Transfer demo, but they're causing the following error message:
InvalidArgumentError: Unknown image file format. One of JPEG, PNG, GIF, BMP required. [Op:DecodeImage]
What I've tried
The error message says the file format must be a JPEG among other file types. When I check the file info, it says Kind: JPEG image, and the file extension is .jpg.
The image was shot on a Google Pixel 6 Pro, pulled directly from Google Photos, and then uploaded directly to my GCS Bucket. So I can't understand how there could be a problem with the file format, or what to check for to resolve this.
I've also tried several links to the same GCS object.
https://storage.cloud.google.com/01_bucket-02/PXL_20220315_232045529.PORTRAIT.jpg
gs://01_bucket-02/PXL_20220315_232045529.PORTRAIT.jpg
But I'm getting the same error message with both.
I'm able to view the images in a browser window, so my authentication should be ok.
Causing further confusion, I downloaded one of the wikimedia images used in the demo, then immediately uploaded it to my GCS bucket, and it caused the same error message. The Wikimedia file was .jpg, but when I downloaded it, the extension was .jpeg.
This is the original Wikimedia file I was testing:
https://upload.wikimedia.org/wikipedia/commons/d/d7/Green_Sea_Turtle_grazing_seagrass.jpg
Any clarification on what might be going on with this would be greatly appreciated.
Doug

Cloudinary upload image widget does not work as expected

I am using the upload image widget without success.
1) result.info.path returns invalid url.
2) There is no preview of the uploaded images due to no.1
3) No images are were uploaded to my media folder at Cloudinary.
Fiddle:
https://jsfiddle.net/7uqb83t1/
These are my preset settings:
Can someone share a working version of this widget + preset settings?
On successful upload, you need to check result.info.secure_url for a link to the asset. Currently, in your preset, you're using Async which means the incoming transformation is performed in the background (asynchronously), and as such, you will get a pending result. Async assumes you're using a Notification URL as a webhook where you'll receive the Upload API response when the processing is complete. In your case, I'd recommend turning the Async off.
Also, your incoming transformation configured in the preset is not valid and because of that, you will be getting an error on upload. Please console.log this in your JSFiddle to see it. Essentially, it'll be -
Auto gravity can only be used with crop, fill, lfill, fill_pad or
thumb
'auto' gravity (g_auto) implies cropping (automatically selecting the most interesting part of the image to focus on) and therefore you need to use an appropriate crop mode. 'scale' keeps all image data and no cropping is made so that is why g_auto can't work with it. Please see the following section of the documentation for details on the different crop modes - https://cloudinary.com/documentation/image_transformation_reference#crop_parameter - which will help you decide which one you want to use.
Lastly, you should also consider updating your incoming transformation so that it only resizes once, since currently, resizing it three times with the same crop mode is redundant. For example, you can use c_scale,q_auto,w_687 only, or if you want with 'auto' gravity you can try c_fill,g_auto,q_auto,w_687.

WebGL 2D Texture Display Error

I'm having an odd problem. On Chrome and Firefox, everything is fine, but in Safari when I load 2D images onto a particular panel (using WebGL) I get the following error:
WebGL: INVALID_VALUE: texImage2D: packImage error
The images are greyscale 128x128 jpegs. I can provide more code if necessary, but I'm having trouble even finding out what this packImage error means.
Thanks!
I found that after loading the texture, you just need to set the appropriate format. For instance:
var tex = THREE.ImageUtils.loadTexture('img/grayscale.png');
tex.format = THREE.LuminanceFormat;

Image url to byte array using Silverlight

How to convert image url to byte array or stream using Silverlight?
Easiest thing to do is use WebClient to download the Uri as a Stream. For this to work at least one of the following must be true:
The image is hosted on the same domain as the Silverlight app.
The domain that the image is hosted on is providing a clientaccesspolicy file to allow your Silverlight app to access the image.
This will give you access to the contents of the file as a Stream. If you want access to the decoded pixels rather than the raw contents of the file, load the Stream into an Image element (using BitmapSource.SetSource(Stream)), wait for the Image.ImageOpened event and then capture the Image element in a WriteableBitmap. You can then read the image pixel data from the WriteableBitmap.Pixels array. If the image is not coming cross-domain, you do not need to download the Stream and can just set the Image Source to the URI directly,