Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Best way to add Drop Shadows to Variably Sized Images

As there isn't a drop shadow property for images (or is there?) does anybody have suggestions on best approach for this?

— asked April 15th 2010 by Marshall Jones
  • images
  • imageview
  • shadow
0 Comments

4 Answers

  • Assuming the images are rectangular, and that you have a way to obtain the image dimensions, you can draw an same sized empty view with a suitable shadow color and offset the position (e.g., left-5, top-5) and then display the image on top of that.

    — answered April 15th 2010 by karlo kilayko
    permalink
    0 Comments
  • Good idea, but would that allow for any blurring of the shadow? I think what you're suggesting would just give me a hard edged shadow with transparency - which may be better than nothing.

    Wishing there were CSS-like attributes where I could say something like:

    box-shadow:2px, 2px, 2px, #000;

    — answered April 18th 2010 by Marshall Jones
    permalink
    0 Comments
  • See Drop Shadow Text in Appcelerator Titanium on how you can use a webView and the text-shadow css directive to add a proper blurred drop shadow effect; I suppose that you might use a similar approach to embed html content that leverages real CSS attributes.

    — answered January 16th 2012 by Marcantonio M
    permalink
    0 Comments
  • Here's a really good widget

    Download

    — answered September 17th 2013 by Imagitech DJ
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.