Download full size image link in drupal 7 gallery - drupal-7

I've created a little gallery in drupal 7 using views module and colorbox formatter for image field. The thing is, I'd like to provide url for full size image download. Mind You - "full size image" is not the same image that appears in colorbox overlay. In fact I don't have full size image at all, since I've limited max image dimension on upload (1000 x 1000px). And I'm not sure how to overcome this restriction.
So, user should be able to click on a thumbnail (100 x 100px) and view 1000px wide version of an image in colorbox overlay. And apart from that there should be download link to full size photo (4000px wide, for example) - preferably in an overlay, but may be on the gallery page as well.
I could just skip size limits on upload and pull the link from image src, but I wanted to save bandwith and speed up display. Well, creating a gallery full of 16 Mpx photos isn't the way to go, anyway.
Is there any clever way to achieve what I want, or do I just need to hack file upload module a bit?

Ok, I've found an answer. And it's pretty simple, now that I think of it.
Since image derivatives are created on the fly, I just needed to create another image style in admin/config/media/image-styles, 1000px wide and high, and remove upload limit in image field.
"Full size download link" may be then created by a regex in JS, just replace one path to image with another.

Related

How ImageResizer Dynamically change image resolution based on screen size

I am using ImageResizer to resize the images and display on the bootstrap layout.
Here I am fixing the image sizes while retrieving them to display the sizes in URL.
Issue is, image quality is lost as dimensions are different for different screen sizes and I am unable to adjust the image which is retrieved to fit exactly to the screen size.
Eg: for 14 inch monitor if size of image is 300*300 which gives perfect quality image, if the same image is viewed in 21 inch monitor the 300*300 image retrieved from imageresizer is loosing quality and getting blurred.
Can some one say what is best solution to retrieve images?
Thanks in advance.
Praveen.
Slimmage.js offers automatic resolution and dpi-switching using the ImageResizer URL API. It is probably the easiest way to achieve what you are looking for, as you just install it and set a CSS max-width on images. Done.
Why this is a problem (like Amy says in the first comment):
Because of high-density displays, browser pixels and screen pixels are not 1-1. Thus you need to use a images-swapping technique like srcset, picture, or Slimmage.js. srcset and picture require polyfills to work on older browsers.

Orientation error for images uploaded to GAE (GCS + get_serving_url)

We are developing an image sharing service using GAE. Many users have reported since last week that "portrait images are oriented in landscape".
We found out that from a specific timing, the specification of images uploaded and distributed through GAE has changed.
So the specs seem to have changed around 3/18 03:25(UTC) .
The "orientation" of Exif is not properly applied.
We are using GAE/Python. We save images uploaded by the users to GoogleCloudStorage, then use the URL we get with get_serving_url to distribute them.
Is this problem temporal?
Also, is it possible to return to the specs before 3/18 03:22(UTC)?
I think it happens because when get_serving_url service resize the image, it always resize the image from the longest side of the Image, keeping the aspect ration same. If you have a image of 1600x2400, then the resize image is 106x160 to keep the aspect ratio is same.
In your case one of the image is 306x408 (which is correct)as Image is resized from the height, and the other image is 360x270 (in which orientation change) the image is resized from width. I think in the later-one the orientation is changed just to keep the aspect ratio same.

How to use image as icon in winforms?

I
My requirement is something like attached image.
I am designing an File editor with more options like language , copy ,paste and save. For that i tried adding icon image to menu strip. It worked but i have limitations on size adjustment , clarity all those things.
Could anyone suggest me any option/control to achieve similar to attached image.
Thanks
You can look at 2 approaches:
Use Gallery in Ribbon Control;
Shrink an image to 32 X 32 or 16 X 16 and you will get a reasonable looking icon. You can try this site to shrink you image resources.

ios6 UIImageView - Loading -568h image

I've seen a couple posts about the UIImage automatically loading the filename-568.png image in the new iOS6, but I can't seem to recreate it in the UIImageView class.
I'm using the Storyboard (not my app, just having to do some checks), and I've a simple layout with just the Image View scaled to fit, no code in the view controller, and I've sure the filename.png and filename-568h.png exist (as well as -568#2x.png just in case) but when I load it up in the iOS6 simulator. This has been for iOS 4 and 5, loading the #2x image for retina, doesn't seem to work in iOS6 though. Any ideas?
The image happens to be called Default.png since it is the same as the launch image, could this be the issue?
Thanks for any help in advance
iOS6 does NOT automatically load -568h as it does with the #2x images. The only exception is the default screen, but further than that you have to manually set you 568h image yourself.
I created some code to mimic the loading behavior for -568h images when using the [UIImage imageNamed:#""] method, but from the IB I do not know the way. If you are interested in such a solution, check it out at http://angelolloqui.com/blog/20-iPhone5-568h-image-loading
Typically, you should only use 568h for the launch image. If you notice yourself using different image assets within your app for the new display height, you should consider that you might be making your UI too static.
The most obvious place people want to use 568h for images is for background images. An alternative is to just have one asset that has the largest possible dimensions and align it properly using the contentMode property of UIView.
But perhaps you have something floating in the image at the top and the bottom, so contentMode doesn't solve it. You could consider that the top and bottom floaters should probably be separate views anyway.
Remember, we have always been making apps with variable heights. Every time a keyboard pops up, its as if the size of the screen has shrunk.

Get path geometry from image

If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend.
Thanks
Yes - I just tackled this problem for an LOB application two days ago.
I can't offer advice for Blend (though I've read that it can be done in Expression Designer). However, the best free tool I've found for this is called InkScape (http://www.inkscape.org).
It's opensource, and while it's intended primarily for editing SVG vector-based images, it has two key features that are useful to us WPFers:
It can vectorize (i.e. "trace") raster images like bitmaps and jpegs, albeit not as well as one would hope, and
It can export the vector image as XAML
You'll invariably find that you get better results from loading vector formats (like SVG, EMF, WMF, etc) and saving to XAML, than if you try to convert a bitmap/jpeg... simply because the process of vectorizing a raster image is error prone at best. So if you want to bring a company logo into XAML, try to get hold of the source files used to create the logo (perhaps done in Illustrator?) and import that into InkScape.
If this post is helpful, please be kind and give it a one-up.
Jasema is a terrific tool right for the job.
Also, don't be shy to use Blend - it is somewhat more difficult to use (drawing shapes using pen) but it gets easier pretty fast. Switch on gridlines and optionally snap to them for good results.
What both Jasema and Blend are lacking, is the ability to easily create shapes with a central symmetry (like stars), so I took parts from Jasema and created my own tool (named Radius) that works a bit like a combination of a ruler and compass.
I have a good idea but you're png, bmp, jpg or other non vector file is must be very simple because we need best scan results and only use inkscape.
Step: Drag and drop your file workspace on Inkscape, download free.
Tip: If your image is color white, Top menu item File->Document Properties-> heck Checkerboard Background and if you want uncheck Page border show.
Step: Top menu item Path-> Trace Bitmap-> Mode check what you want property, i usually use color property and if your file is png check Remove Background then click OK, then wait again Ok button is Enable and close window.
Step: Now you have a two layer, top layer vektor file and bottom layer your file. Select vector file and top menu item Edit-> XML Editor-> select svg path and look side column, d name propery in your data path value.
But this method may not always work or may not give the desired results and draw your own shapes with the scape so you can get the path data from the XML editor.
Example, my first tests this like:
and after working on it some more:
I've solved my problem (export an image as XAML) using Microsoft Expression Design 4 (Free Version). I've downloaded from the link
http://www.microsoft.com/en-us/download/confirmation.aspx?id=36180
As input, I had Adobe Ilustrator files.
Adobe Illustrator / CorelDraw is perhaps the best tool out there for these operations that I have used.
Personally, I prefer illustrator for on-screen media. These tracings can be exported into several formats such as EPS, SVG, AI, or even XAML (with this plugin)
Best of Luck !!!!
I have recently been struggling with this myself. I had a set of icons done in data and needed to update them to look nicer.
I tried everything, manually typing them out. drawing in svg, converting svg to xaml.
in the end i found a list of open source icons from google material icons.
I then used this to convert from the svg files to data
https://github.com/BerndK/SvgToXaml
It works well but not for the icons i drew myself.
I decided to place all the icons data i convert into an app i built myself that will give you the data and a preview of the icon. feel free to use and contribute. I will keep updating as much as i can.
https://github.com/sgreaves1/XamlIcons
Convert your image from png to svg in online converter, then drop file into this site http://inloop.github.io/svg2android/ and you will see pathData of your image like below shown in my image.

Resources