iTunes API: get 100x100 px icon of an App - json

I'm using iTunes API to get some informations about apps in App Store.
Reading the documentation I saw that "artworkUrl100" parameter, taken from JSON request, will get me a 100x100 icon of the app.
I notice that this not works always, and sometimes it contains the url of a biggest icon.
Is there a way to get with certainty this icon (100x100 px)?

You can do that like this.
Let say this is your link:
http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.png
(from "artworkUrl512").
You just have to add .100x100-75 before .png like this
http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.100x100-75.png
Also ju can adjust icon size you need by adding different values like .150x150-75. Only problem is that this -75 part depends on icon size. it can also be -50 for smaller or -65 for middle size icons. I still did not figure that out.
Hope this helps you.
EDIT:
You do not have to worry about .jpg or .jpeg. You can replace all with .png it will work.

Related

Way to get un-cropped thumbnail images?

Can anyone advise if / how to get un-cropped thumbnail images of files in drive?
Thumbnails in the Recent files component appear to be un-cropped (if you use browser inspector), whereas thumbnails in the component below it are below are cropped. While you can change the size of the thumbnail in its url query params, this doesnt solve the cropping problem.
Im building a redesigned frontend - using css grid for a more irregular aesthetic - as a learning project. To do this, Id need to get un-cropped images - to, for example, show documents as vertical rectangles, not the standard square cropped thumbnail. Id appreciate it if you have any ideas on this. Thanks!

Replace an image in Google Slides with Apps Script with same croping

I'm trying to replace an image in a Google Slide by a smaller version of it (in terms of bytes).
The smaller image should be displayed exactly the same way than the older.
But when my original image was croped, I cannot reproduce it with the new one.
What I'm doing is simple (I'm using this replace method)
let image = page.getImages()[0];
let newImageUrl = optimize(image.getContentUrl()); // API call to get an optimized image. newImage will have the same width and height
image.replace(newImageUrl, true);
A visual example.
Here is my slide before (pay attention to the "Quick" logo at the bottom right corner)
And here is the result after replacing it (you can see that the bounding box is the same, it takes the same space in the slide, but the image itself is lower)
How can I reproduce the croping that I've initially done in my slide with that button ?
Thanks
Issue:
As mentioned in comments, crop properties are currently read-only, so this cannot be done. Here are possible workarounds: https://stackoverflow.com/a/63256489, https://stackoverflow.com/a/64040404, https://stackoverflow.com/a/67309702.
Feature request:
There's a feature request in Issue Tracker. Anyone interested in this, consider starring it:
Why are Image Crop Properties read only

gizmo based on Three.js is not visible

I created Forge viewer app w/ Transformation Extension based on GitHub sample "forge-extensions", for unknown reason, gizmo is not visible after I click on element, only very small yellow dot after zoom in, I believe it's element center point and gizmo size is too small, so my question is how to control it? in fact, all the coding is copied from that GitHub sample "forge-extensions", I must miss something simple!
Have you tried your code with different types of models, and does it behave the same for all of them? I believe it may have something to do with the scale of the particular model, especially when looking at these lines of code from the viewer extension:
_transformControlTx.setSize(
bbox.getBoundingSphere().radius * 5);
Try and put a breakpoint there, and see what the radius is. Or try adjusting the hard-coded value.

How to add image options: cropping, resizing, etc. to http image file

I would like to know how do I add image options the image size on request. I have seen something like:
http://exampleimage.png?w=120&h=200
Sometimes they even add options to crop, zoom, etc. Thanks in advance.

How to capture zoomable image as one high resolution image?

I would like to capture a zoomable image at a high resolution zoomed at 3x. Do you know of a way I can piece this image together without having to do it manually? Here is the image
After using bhups' solution, tweaking outputxand outputy for a good while, I tried something else.
I went back to the object page (in the above example, here), took the thumbnail image URL (http://www.metmuseum.org/Imageshare/ep/regular/DP145931.jpg), replaced regular with zoom and to my surprise got what I presume is the full image, with less effort:
http://www.metmuseum.org/Imageshare/ep/zoom/DP145931.jpg
You can tweak the URL to get the job DONE. Here is the URl for 3x image. http://media.metmuseum.org/mgen/metzoom/zoom3.ms?img=DP145931.jpg&wrapperid=11&outputx=1200&outputy=1601.067378252168&level=1&x=0&y=0&backcolor=0x00000
outputx and outputy are the output image dimensions. level implies the zoom level. and x and y are the top left corner of the selected rectangle.