AEM DAM assets: Wrong size of web enabled renditions - aem

Recently we observed that the maximum size of a generated rendition is 1280x1280. We tried to generate a rendition of size 1440 x 1440.
Steps to reproduce:
Navigate to /etc/workflow/models/dam/update_asset.html.
Edit "Process Thumbnails" step: set Width and Height to 1440 on tab "Web enabled image".
Click OK, save workflow.
Go to DAM admin.
Add a new asset that is larger than 1440x1440px.
Wait until renditions are generated.
Actual results:
Check size of cq5dam.web.1440.1440.jpeg rendiiton. Should be 1440x1440, but instead is 1280x1280.
Expected results.
Renditions generated in given size.

It turned out that the resolution 1280X1280 is the highest limit for the renditions to be generated, which can be modified as required.
To modify the limit for the renditions generations one have to change 'Day CQ DAM Buffered Image Cache' configuration (felix's console) under the 'Max Dimension' property (http://:/system/console/configMgr/com.day.cq.dam.core.impl.cache.CQBufferedImageCache)
You can change the default 'Max Dimension' property from 1280 x 1280 to a higher one (for example, 3000 x 3000), so that it supports the custom dimension defined in the workflow process for the web rendition.

Related

Slack Thumbnail url from Slack api for any file type like Image, Pdf, Audio, Video etc

I need to extract thumbnail url for any particular file.
while accessing the https://slack.com/api/files.list
I saw that for image thumbnail key asfiles : thumb_64, thumb_80, 360 type JSON keys
For pdf it is like
& similarly for other file type it has different different json key to find thumbnail.
So for every particular file type should i find thumbnail key manually. Any shortcut to find thumbnail key for all file type.
I need to pass my thumbnail url to some service no matter what kind of file it is.
Thanks!
The documentation for the file object type gives some information on this. But as you have already noticed, it doesn't mention PDF or other file types.
If a thumbnail is available for the file, the URL to a 64x64 pixel
will be returned as the thumb_64 prop.
The thumb_80 prop (when present) contains the URL of an 80x80 thumb.
Unlike the 64px thumb, this size is guaranteed to be 80x80, even when
the source image was smaller (it's padded with transparent pixels).
A variable sized thumb will be returned as thumb_360, with its longest
size no bigger than 360 (although it might be smaller depending on the
source size). Dimensions for this thumb are returned in thumb_360_w
and thumb_360_h.
In the case where the original image was an animated gif with
dimensions greater than 360 pixels, we also created an animated
thumbnail and pass it as thumb_360_gif.
Depending on the original file's size, you may even find a thumb_480,
thumb_720, thumb_960, or thumb_1024 property.
I did try looking through the Slack client's JS code (search for thumb_pdf in client-boot-imports.XXXX.min.js), and found a code block where it seems to be defining possible thumb_* keys. While it is not conclusive, you may look for these fields in the API response and fallback to a default image for each supported format.

Putting a percentage to put in a form control

I've got an access database which we use to book web advertising against a forecast/inventory limit.
I have three unbound text boxes which work out three things from the continuous form it sits below:
Impressions[txtImpressions]: =IIf(IsNull(Sum([Impressions]))=True,0,Sum([Impressions]))
Forecast[txtForecast]: (Populated on form load by vba)
Remaining Availability[txtDifference]: =[txtForecast]-[txtImpressions]
I would like one more box, which shows the impressions as a percentage of the forecast, so if txtImpressions contains 200 and txtForecast contains 400, I'd like the percentage box to show '50%'
I've tried =[txtForecast]/[txtImpressions] to at least divide it, but it always give me a value of 1. I've tried
=Format([txtForecast]/[txtImpressions]), Percent))
but that doesn't help either.
Can anyone help?
Set Format property of textbox with percentage to Percent (in Form designer)
You see always "1" if Decimal Places of your text box is set to 0.
Comtrol Source property of this text box should be =[txtForecast]/[txtImpressions]

Change small_image size Magento

I need to change the small image size on Magento community.
HereĀ“s why, it does not fit the global product window.
link here
I tried at \app\design\frontend\default\magik_pinstyle\template\catalog\product\list.phtml
and flushed the image cache but I does not work.
I can see it`s a 265px image but when I search for a resize(265) I dont find anything.
This would actually be located in app/design/frontend/default/magik_pinstyle/template/catalog/product/view/media.phtml. Copy the file over from app/design/frontend/base/default/template/catalog/product/view/media.phtml if you don't have it on your template. On line 68 (in the base media.phtml) you'll find this line:
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" itemprop="image" />';
Your photos don't fit the frame because your .product-view .product-img-box .product-image CSS is set to 320x300px (width/height). If you want your pictures to fit, you need to make sure the resize is set to the same size of the frame, and you should probably square off your frame.
If you want the larger frame, change your image CSS to 320x320px or 300x300px and change the above line to resize(320) or resize(300), respectively.
If you want to keep the 265x265px image size, change your image CSS to 265x265px and leave it as is.
Edit
It is still using a file in 265x265px resize cache.
You should deliberately clear out everything in your /media/catalog/product/cache folder, first the media.phtml checks to see if a resize already exists and falls back to that. If one isn't found, then it runs the resize.
You are editing the file found in app/design/frontend/default/magik_pinstyle/template/catalog/product/view/media.phtml, correct? If altering the existing resize function doesn't work after completely emptying the cache you can add the ->resize(300) function to line 15:
$this->helper('catalog/image')->init($_product, 'image')->resize(300)
Lastly, if you have a custom lightbox or theme section in your settings, check for anything you may have missed to alternately set dimensions.
Make sure to refresh your cache, you should clear your image cache too.
I know that this is an old post but but I want to add something that seems to be left out off most of these responses, you must enlarge the container that the image is contained in otherwise the image will not be enlarged.
I followed the first part of Jason's answer above by going into
app/design/frontend/default/magik_pinstyle/template/catalog/
/view/media.phtml. Copy the file over from app/design/frontend
/base/default/template/catalog/product/view/media.phtm
and changing line 32 and 33 to
$bigImageX = 608; from $bigImageX = 308;
$bigImageY = 608; from $bigImageY = 308;
and nothing happened after flushing of the cache both magento nor browswer.
I then went into dev tools and enlarged the width of
<div class="produt-img-box">
which increased the size of the image to my desired size.
Just to be clear, I also had to shrink the size of the
<div class="product-shop"> to totally accomplish my goal of resizing the image.

Text size selected in combo

As we can see on lots of web site : we can increase or decrease size of font. Like on this example : http://blog.creonfx.com/examples/javascript/dynamic-font-resize.html
Is this possible in GWT ?
So could I change general (= all widgets) font size dynamically by choosing a size in a combo (1, 2, 3) like on the image ?
Depending of the widget, for example the ones which have a content property which could be set with Html should be feasible I think....
If you can get a reference to the DOM element you want to change you would probably be able to change the style via some specific javascript.
But in any case I don't think there is a direct way of doing it and on any widget.
You can have a look to this thread also which indicate this fact.

Get larger (non-thumbnail) image for Facebook Graph Link object

Is there a way to get larger, non-thumbnail image for a link object? For example, given the link object https://graph.facebook.com/344600782244586, how can I get something larger than the thumbnail?
https://graph.facebook.com/344600782244586/picture does not work. It gives me the error "No node specified". Which means I can't use the type parameter.
The link object has a picture property with a value of http://external.ak.fbcdn.net/safe_image.php?d=AQAjeHBmdhzmBYB7&w=90&h=90&url=http%3A%2F%2Ftctechcrunch2011.files.wordpress.com%2F2012%2F03%2Fgf.jpg%3Fw%3D150. That will give me the thumbnail. I've tried just playing with the w and h values, but then Facebook just returns a 1x1 GIF.
My current approach is to pull out the url parameter and use that, but I'm wondering if there is a FB approach I can use.
seems there is a new "full_picture" field to ask for:
/posts?fields=full_picture
note that it's still not referenced, so I don't know if it's working at 100% and seems to be great for links but not pictures.
I personally combines 2 solutions:
if link I use full_picture field
<img src="[full_picture]" />
if picture (after asking for object_id field /posts?fields=object_id ) simply:
<img src="https://graph.facebook.com/[object_id]/picture" />
I kind of found a hack way to get the larger pic. If your image url ends in "_s.jpg", just replace the "_s" with "_b" and voila. Its a hack, that may not work tomorrow, but for now, it
does.
See below:
Small pic vs Big Pic
From the graph api
https://developers.facebook.com/docs/reference/api/
You can specify the picture size you want with the type argument, which should be one of square (50x50), small (50 pixels wide, variable height), normal (100 pixels wide, variable height), and large (about 200 pixels wide, variable height): https://graph.facebook.com/[INSERT ID HERE]/picture?type=large.