I have a few questions related to images in gracenote API.
Let's take this image for example: http://akamai-b.cdn.cddbp.net/cds/2.0/image/5899/C629/E091/E3A2_medium_front.jpg
After trying to manipulate a bit the image name, i found that i could get another format for the same image: small.
Is there somewhere in gracenote documentation where i can get list of possible image formats ?
Another thing that i noticed in image name is "front".
Does that mean that there are other images for the same content that we can get ?
Thanks to anyone who can help me about that.
You can find options for image sizes in the eyeQ Web API Reference Documentation https://developer.gracenote.com/sites/default/files/eyeq-webapi-ref.pdf
The image sizes available are
THUMBNAIL (75)
SMALL (170)
MEDIUM (450)
LARGE (720)
XLARGE (1080)
(Note, all dimensions are max size - some images are not square)
You can select one or more image sizes through the IMAGE_SIZE option, e.g.:
<OPTION>
<PARAMETER>IMAGE_SIZE</PARAMETER>
<VALUE>XLARGE,SMALL</VALUE>
</OPTION>
The image format is .jpg but I assume you are asking about image sizes.
There are at most 5 sizes available: thumbnail, small, medium (default), large, xlarge.
Also there is only one image returned per content.
Related
I'm using tcpdf to generate a report that contains a logo from a svg vector image.
My goal is to efficiently re-use the same image payload over and over in the report, not storing the logo as if it was a different image on each page.
Right now, with the current data, the report generates 32 pages. The file size considerably increases with new pages being added. This seems to be due to the logo being repeated on every page.
I don't have tools to analyze what is inside the pdf but I can see from other reports that are generated by other applications, that the file size of pdfs containing repeated images peaks at 1 page and then on each consecutive page, the size increases very slightly, indicating that the first logo is efficiently re-used.
How can I achieve that using tcpdf?
If in my report, I place the logo only in page 1 and omit it in pages 2 - 32, still outputting all the text data, the file size is greatly reduced, just as in the examples that I mentioned before. This indicates that the svg data is repeated on every page.
From the example 009 in tcpdf's site documentation, I've tried loading the image from file and also tried using a "data stream" (this is encoding the svg in base64 and instead of referencing the image from a file, you use the text-based base64 variable content as a stream that contains the image payload).
I thought that using the data stream would take care of it, but it didn't.
Is there a way to reference the same image over and over in tcpdf?
For example, given File:Wikipedia-logo-v2.svg as input, the output would include:
http://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/200px-Wikipedia-logo-v2.svg.png
http://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/500px-Wikipedia-logo-v2.svg.png
...
The original image is a vector, the urls you have provided link to the wikipedia thumbnail generator.
It will generate an image of any resolution you specify, you can just change the value in the url and it will generate an image of that size.
I don't know why you would want to use it however. You should just get the original image and scale it yourself to your own needs.
Ebay now requires images to be 500x500.
I want to try to use ImageResizer to resize an image to be a minimum of 500x500 by adding white background padding
The following command achieves this quite easily.
product.jpg?width=500&height=500&scale=canvas
This works great, except when the original image is 800x800 and it will be downsized and lose quality.
What I really want to do is combine scale=canvas with scale=upscaleonly but that doesn't seem to be possible? Am I missing something or will I have to write code myself using the API.
PS. I realize ebay may detect whitespace and still reject the image, but I'm trying that for now - I have a lot of perfectly good 450x450 images that fall short and I don't want to upscale them.
At present, there's no 'upscalecanvasonly' mode.
So far we haven't had anyone else request this, but feel free to add it to our UserVoice site as a feature idea.
You could also implement this with a small IPlugin that subclassed BuilderExtension and implemented LayoutImage to support an additional command. It shouldn't be very difficult.
I haven't used ImageResizer before, but I've worked with images, so I took a quick peek at the basic commands for ImageResizer.
If I understand your problem correctly, when you downsize a 800x800 image it looses quality. This does point to a severe problem because the original image has more data than what is needed to display a high quality 500x500 image. Because of this, we must look at the image file format type and the data compression quality/method.
In your example, you are using the JPEG file format. You may want to specify the format in the command, i.e., format=jpg
In using the JPEG format, Imageresizer gives you control over the quality of the compression:
The documentation states:
quality - Jpeg compression: 0-100 100=best, 90=very good balance, 0=ugly
Take a look at the documentation for the exact verbage for setting the quality.
I’m using the BuddyPress Activity Plus plugin and wanted to know if there was a way to call the full size image that was uploaded when viewing the single page of the activity?
I’ve looked at placing a line of code in “activity/entry.php” of the child theme but can’t find anything that will call its full size image, only the thumbnail shows with the link to the full size image to open in a lightbox.
This isn’t what I’m looking for, the full size image needs to be in place of the thumbnail when viewing the single activity page.
Any idea anyone? Sorry if this is the right place for this, just having trouble getting an answer
Many thanks
I'm looking to do a similar thing, not too much luck yet. Also - have you noticed that if you upload multiple images, they stack, rather then laying out side by side?
EDIT:
Found out how to make the images in the stream bigger:
You can set your preferred thumbnail size separately from your default thumbnail size settings, if you wish to do so. You can do that by adding this line to your wp-config.php:
define('BPFB_THUMBNAIL_IMAGE_SIZE', '200x200');
Where "200x200" are width and height (in that order), in pixels.
Finally, be sure to verify your default sizes for embedded media. It's in Settings -> Media -> Embeds -> Maximum embed size
I'm dynamically generating a PDF with a few variables but also need to be able to embed an image on the PDF. Anyone have any experience doing this using ?
You use a regular HTML image tag.
However for good print quality images you need to use an image that has larger dimensions than you might use in the document.
For example:
<img src="/path/to/my_picture.1280x800.jpg" style="width:320px;height:200px;" />
So in that example the width/height of the image file is at 4x what is displayed (obviously the source image need to have that quality to start with; resizing a smaller image bigger wont do much).
Being PDF, you've got conventional units too, so you can use CSS's in or cm units to set sizes relative to the paper size, but you'll still have the same issue of needing a larger input file. (This example is 160 px:in resolution)
<img src="/path/to/my_picture.1280x800.jpg" style="width:8in;height:5in;" />
Something else to be aware of - since the images are embedded (uncompressed?) in the PDF this can significantly increase filesizes, so you may need to experiment to work out the best trade-off between filesize and image quality.
Direct html tag did not work. But I figured out a solution which did.
<cfset photoLink = "D:\........\example.jpg">
<cffile action="readbinary" file="#photoLink#" variable="binAgentPhotoFile">
<cfinvokeargument name="photoFile" value="#toBase64(binAgentPhotoFile)#"/>
Argument is then passed to the schema.