Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
My Carrier: Airtel

Image Filling Up

[ Edited ]

hi All,

i have to implement a shopping cart for cushion company,where i have to show a list of color and fabrics , till this its ok.but problem is i have to fill up a particular cushion  with diffrent color and fabrics   dynamically.so that user can view same cushion  with their desired colours/fabrics.Is it possible ? nd how?plz tell me.i dnt want to have cushion images with every colors and fabrics  since its not possible.so tell me any solutionn so that i can have  cushions with different shapes and can fill up with diff.colors and fabrics.plz..guide me...so much confused..:smileysad::womansad:

 

 

plz....help me..

 

d.dev
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Image Filling Up

Are you wanting to show the generic cushion in different colors, or show a cushion for its shape and squares that contain the colors that it comes in? Do you have the RGB values of the colors?
Please use plain text.
Developer
steve_web
Posts: 319
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Image Filling Up

One of the ways I've done this in the past is to create a PNG image that is a white box with the silhouette of the item (in my case it was a t-shirt) "cut out" of the middle by setting the alpha opacity to zero.

When rendered on top of any square of any color the item "magically" appears as that color.

If you get real fancy, you can have partial opacity with white/black over the shape to provide highlights, shadows etc. of what your real item should posess.

If you have a picture of one cushion now with good contrast someone with photoshop skills should be able to create the image for you.

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
My Carrier: Airtel

Re: Image Filling Up

Actually i have to show cushions with 4 different shapes and list of 50 diff.fabrics and colors.My requirement is to provide the way to  the users to apply all those individual fabrics and colors as per their choice and let them visualize.so wat to do?i dont want to have individual cushion image with 50 diff.fabrics stored in my app.it should be dynamically.

 

plz...help me...

d.dev
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
My Carrier: Airtel

Re: Image Filling Up

[ Edited ]

@steve_web thanks a lot for ur idea.but i cant understand how to make this working with such PNG image.can u help me?do u have this kind of image?if i  have to show different colored border along with fabrics for each shape (i.e cylindrical,rectangle etc.)how to do this ? can u help me with ur ideas?

 

Thanks in advance

d.dev
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
My Carrier: Airtel

Re: Image Filling Up

[ Edited ]

@ steve_web ur solution worked!!thanks a lot. now i m stuck with that border problems .plz tell me wat to do? i have to use following cushions.with diff fabrics with diff.border colors.

 

 

 

d.dev
Please use plain text.
Developer
steve_web
Posts: 319
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Image Filling Up

I think it will be possible... but you'll need (ideally) some bigger original clean images with good contrast.

 

I found this pillow online... and making the outline (with a bit of internal texture/lighting/shadows kept) I overlaid it on a quick HTML table I created where each cell has a different background color set.

 

The result is that you can basically make as many pillows as you want.

 

For the record... I made my image with 100% white around the outside of the pillow... and then for the inside I took the original pillow (a greenish color) and forced it to grayscale... then used it as a photoshop layer in "overlay" mode with about 50% opacity.

 

pillowSample.png

 

Here's a screenshot of the "clones" I made by laying the above image over top of colored squares.

pillowSamples.png

 

oh, and for the record, here was the original image I found on Google (all rights to the original owner)

http://i.c-b.co/is/image/Crate/BrinkleyPlw18inChrtrsF12/$web_zoom$&/1205110904/brinkley-chartreuse-1...

 

Hope this idea helps out... if you do come up with some clean images you'd like to use and need some help just send me a PM and hopefully we can make it work out.

 

Cheers,

Steve


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
My Carrier: Airtel

Re: Image Filling Up

 

Thank u Steve.:Shifty:

 

I am using that  image.its showing a perfect pillow like image,when i placed it over another image which is my selected Fabric.but really cant understand how to show border dynamically.actually scenario is when user wants to add border to pillows a list of colors will be shown and user can select any color from it and border  of that color will be added to that pillow dynamically

 

 

d.dev
Please use plain text.
Trusted Contributor
itcraps
Posts: 238
Registered: ‎12-26-2010
My Device: BlackBerry Z10
My Carrier: Telus

Re: Image Filling Up

[ Edited ]

1. try changing the RGB value of a cushion bitmap first in Photoshop.

 

2. Save those values in an XML Document and load them up for each specific cushion color.

 

e.g.:

 

<CushionSeries2011>
  <Red>
    <R>val</R>
    <G>val</G>
    <B>val</B>
  </Red>
  <Blue>
    <R>val</R>
    <G>val</G>
    <B>val</B>
  </Blue>
  <SmoothGrey>
    <R>val</R>
    <G>val</G>
    <B>val</B>
  </SmoothGrey>
  <DarkGray>
    <R>val</R>
    <G>val</G>
    <B>val</B>
  </DarkGray>
<CushionSeries2011>

3. Apply filter to the cushion

 

 

www.jackdevora.com
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
My Carrier: Airtel

Re: Image Filling Up

[ Edited ]

How to filter it?

 

With your sol.is it possible to show both farics and borders dynamically?actually for each user selected fabrics atleast 40 border colors is available and user can select all those border colors dynamically along with fabrics

d.dev
Please use plain text.