mquan / lavish

a rails app that generates Bootstrap color scheme from an image
http://lavishbootstrap.com/
694 stars 92 forks source link

Page breaks with provided image. #3

Closed ghost closed 12 years ago

ghost commented 12 years ago

If in the Step 1 section I input http://en.gravatar.com/userimage/25805900/5e326e6838f12248646bdfbac7f631df.png?size=600 then the page gets rendered without style.

I think it's because there are too few colours to work from.

teetteet commented 12 years ago

give only the url till .png http://en.gravatar.com/userimage/25805900/5e326e6838f12248646bdfbac7f631df.png

without "?size=600 ".

ghost commented 12 years ago

Still doesn't work and it's not an issue about having anything after the extension because https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x-hover.png?1324325453 works. The reason the GitHub logo works is because of all the shades of gray whereas the panda picture doesn't have enough colours. As I said earlier.

teetteet commented 12 years ago

ok, but this works for me.

http://www.lavishbootstrap.com/?image_url=http://en.gravatar.com/userimage/25805900/5e326e6838f12248646bdfbac7f631df.png

ghost commented 12 years ago

Mmmmh, that's weird. I get this http://img855.imageshack.us/img855/1558/bug1n.png

ghost commented 12 years ago

Which browser are you using? I'm using Chromium 19.0.1042.0 (Developer Build 122064)

teetteet commented 12 years ago

firefox 9.0.1 sorry, now i know what you mean, the first image provided only shows B/W the second picture bug1n.png also shows the grey in differnet areas of the front page. sorry!.

mquan commented 12 years ago

The prizm gem won't return more colors than amount present in the image. Right now, we tell it to extract 7 colors from any given image. We can fix this bug by deriving more colors from darking/brightening the generated colors. But I feel like an image with less than 7 colors isn't going to be useful for the purpose of Lavish anyways.

ghost commented 12 years ago

Then tell the client as much. In my opinion, it's far better not to leave the client confused about why the page isn't being rendered and instead pass them a message telling them what went wrong.

mquan commented 12 years ago

Ok, I already pushed a simpler solution: I'll just use bootstrap default when a color isn't available.