App Store and iTunes API: Getting icon - api

I am using request like this:
http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsLookup?country=ru&id=
It shows information about the app from the Apple App Store but I have some problems with icons.
If i'm getting property artworkUrl60 it is too small 60x60 image, but it is rounder.
And with artworkUrl100 I'm geting 512x512 image that is too big, not rounded and looks ugly when I'm sizing it down to 100x100.
How can I can get nice looking rounded 100x100 image?

You must get artworkUrl512 and then replace ".png" or ".jpg" with specific size ".100x100-75.png" or ".100x100-75.jpg"
See also list all available image formats (png / jpg):
42x42-50
53x53-50
60x60-50
72x72-65
75x75-65
29x29-75
53x53-75
58x58-75
64x64-75
84x84-75
100x100-75
114x114-75
128x128-75
150x150-75
170x170-75
175x175-75
200x200-75
256x256-75
340x340-75
350x350-75
512x512-75

https://itunes.apple.com/lookup?id=1036264023
As per documentation in iTunes Search API :
https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/

I use JQuery and add the ui-corner-all class to images to make them have rounded corners. This works for any size image.

Related

PDF-file thumbnails are shown in wrong color

On a page (TYPO3 Website, ext.: ImageMagick) I want to show thumbnails of available/downloadable pdf-files (always 1st page of the pdf-file as thumbnail). The problem is that the thumbnails (*.gif but I also tried *.jpg and *.png) are created in 'wrong colors', I mean they differ from the pdf content itself (Thumbnails: dark blue color is shown in light blue).
Does anyone has an idea?
This causes PDF with color model CMYK. It will looks fine with ImageMagick when color model is RGB. In such case I prefer to use GraphicsMagick instead of ImageMagick and change the settings in Installtool or LocalConfiguration from for example
$GLOBALS['TYPO3_CONF_VARS']['GFX']['colorspace'] = 'sRGB';
$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = 'im6';
to
$GLOBALS['TYPO3_CONF_VARS']['GFX']['colorspace'] = 'RGB';
$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = 'gm';

Compass - Get width and height of generated sprite-map

I'm building a Sencha Touch mobile application and are using the functionality to create image-sprite-maps with Compass.
Is there any way to calculate the size of the image-map (width and height) and put it as a variable in your SCSS file?
In Compass, image-height and image-width are the functions to get image dimensions. Using them with your sprite map would look something like this (warning, untested):
// Assuming $my-sprites is your sprite map variable
$map-path: sprite-path($my-sprites);
$map-height: image-height($map-path);
$map-width: image-width($map-path);
In the latest version of Sass (3.4) sprite-path() returns the full filesystem path while image-width() expects a path relative to the images directory. But there is a simple solution:
sprite-width($sprite-map);
sprite-height($sprite-map);
You can get a unit value by using the magical dimension functions <map>-sprite-height and <map>-sprite-width.
// Note: "my-icons" represents the folder name that contains your sprites.
#import "my-icons/*.png";
$box-padding: 5px;
$height: my-icons-sprite-height(some_icon);
$width: my-icons-sprite-width(some_icon);
.somediv {
height:$height + $box-padding;
width:$width + $box-padding;
}
Check the official documentation for more details.
Ext.getBody().getSize() gets you height and width of the screen but i dont think you can write this in SASS

Images display issue in Dynamics AX 2009 reports saved as pdf

When i saved a native Dynamics AX 2009 report as pdf or pdf-embed it doesn't show the images in the report i.e. company logo in header section, properly. The image comes very distorted, grayish and repeated.
On the other if i export the image in HTML format the image comes properly.
Had anyone experience a similar issue.
Please note that im saving the report as pdf using "file" option that comes when the report print dialog opens.
Any help would be highly appreciated.
Issue will go if the image format used is one of the following
1. 24bit Bitmap
2. TIFF
I have found a solution for this issue in AX 2009:
Bitmap getImageBitmap(ItemId _itemId)
{
HPLInventImages inventImages; // Column HPLInventImages.ItemImage is EDT:BlobData (which is a container)
Image image;
;
if (!_itemId) return inventImages.ItemImage; // Return null bitmap. The whole AX client crashes if you try to do the resizing code below on a null bitmap.
select firstonly inventImages where inventImages.ItemId==_itemId;
//return inventImages.ItemImage; // Would normally just do this, but see comments below.
// Ok, this next bit is weird!
// There is a known issue with AX reports with images in, getting saved as PDFs:
// In some cases, the images appear as garbage on the PDF.
// I have found that resizing the image before rendering it, causes the image to come out ok on the PDF.
// So the code below does a token resize (by 1.0 times!) operation on the image before returning it.
// That is enough to make the image on the PDF turn out ok.
image=new Image(inventImages.ItemImage);
image.resize(image.width()*1.0,image.height()*1.0,InterpolationMode::InterpolationModeHighQuality);
return image.getData();
}

directshow "Color Space Converter" filter configuration problem (VMR windowless renderer)

I'm using VMR to mix a bitmap with a video stream. I run the renderer in windowless mode.
Since I need to have more than 1 stream on the renderer, I add the renderer to the graph first and then use IFilterGraph2::RenderEx with AM_RENDEREX_RENDERTOEXISTINGRENDERERS.
Everything works fine most of the time, but I have one .avi file that will render fine with RenderFile, but ends up displaying all black when rendered in my graph. I compared the two graphs in graphedit, and they're the same:
capture.avi -> AVI Splitter -> Color Space Converter -> Video Renderer
The only difference between the graphs is that the Color Space Renderer is setup differently: graphedit shows that the following settings in the graph that works:
Input:
Major Type: Video
Sub Type: ARGB32
...
XForm Out:
Major Type: Video
Sub Type: RGB32
Whereas in my graph it shows:
Input: (same)
XForm Out:
Major Type: Video
Sub Type: ARGB32
So it looks like the converter is basically doing nothing. I have looked around and was not able to find any configuration interface for the Color Space Converter filter. I've also tried different things with IPin::QueryAccept and IFilterGraph2::ReconnectEx on the VMR input pin and the Color Space Converter output pin to try and force the output of the Converter filter to RGB32, but I haven't had much luck. Hopefully somebody here can point me in the right direction!
As far as I know the Color Space Converter filter does not have an interface, but you don't need it either. You can force the Color Space Converter filter to convert to RGB32 by inserting a filter which only accepts RGB32. The TransNull32 from the RGBFilters example does exaclty this. Your graph will look like this:
capture.avi -> AVI Splitter -> Color Space Converter -> TransNull32 -> Video Renderer
See also Regarding the scope of Sample Grabber in DirectShow where I explaind how to use the TransNull24 filter.

Opencart thumbnail size

I've just started to work with opencart so I don't very much. I want to change the thumbnail size of my products to a bigger size. So, I've researched on Google and an answer came up. Go to System>Settings, Edit Store and under the Image tab, choose the size I want. The thing is, that is not working and I don't know why. For example, on Best Sellers or on Featured Products, the thumbnail size is always the same, 80x80.
Any help?
Tiago Castro
In OpenCart 1.5.4 it's System > Settings > Edit > Image in the Admin panel.
Most of the modules use the "thumb" size for the home page position but have static image sizes coded for the left/right columns.
You have two options... Either switch the template to pull the thumbnail size:
Edit /catalog/view/theme//module/.tpl
(replace with your theme if you have one and with bestseller.tpl and/or featured.tpl)
replace $product['image'] with $product['thumb']
Although then your thumbnails may be oversized for your left/right columns...
The other option is to edit the controller and specify the size...
Edit /catalog/controller/module/.php (again either bestseller.php or featured.php)
In 1.4.9.x around line 67-68 you will find:
$this->data['products'][] = array( // From line 58
....
....
// Line 67
'image' => $this->model_tool_image->resize($image, 38, 38),
'thumb' => $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
Just decide if you want to hardcode the new image size (in this example it is 38x38) or link the 'image' size to the thumbnail size.....
if you are hardcoding it, just c hange the "38, 38"...
If you want to link it to the thumbnail size, just copy the value from 'thumb'
In Admin panel, go to extensions>Features>Edit, in edit mode change 80x80 to anything you like, I assume you want it equal to the rest of the images, if so edit it to match. Repeat for Latest module.
No need to edit any code. Go to:
Extensions -> Modules ->Latest
and you can edit the image size from there.
extensions>features>edit also helped me to increase the size of image in thumbnail. thanks a lot.....
extensions>Features>Edit helped me, I just had to put the same image size that i put in System > Settings > Edit > Image (in Product Image Thumb Size).
I am using the version 1.5.6
For New Opencart version 2.3.0.2 , might help for new versions
you can go to Extensions > Extensions > choose Themes from the 'Choose the extension' type selector and then click > Edit on your theme, to view the Images section and change your image sizes.