gradient

Imagemagick loses gradient on image on Ubuntu

余生颓废 提交于 2019-12-06 15:45:54
I am using Ubuntu 11.10. I have installed ImageMagick from the latest source package. Here is the output from "convert -version" Version: ImageMagick 6.7.6-6 2012-04-19 Q16 http: // www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenMP I am trying to convert an svg into a png which works great unless I have a gradient on some part of the image. Here is the command I am running: convert RedPoweredByPenguins.svg redpenguin.png Here is the SVG: http://gamepsychos.com/penguinCheckers/redPenguin.svg And here is the png it creates: http://gamepsychos.com

Estimate Image line gradient ( not pixel gradient)

烈酒焚心 提交于 2019-12-06 15:36:27
I have a problem whereby I want to estimate the gradient of the line on the contour. Please note that I dont need the pixel gradient but the rate of change of line. If you see the attached image, you will see a binary image with green contour. I want to label each pixel based on the gradient of the pixel on the contour. Why I need the gradient is because I want to compute the points where the gradient orientation changes from + to - or from - to +. I cannot think of a good method, to estimate this point on the image. Could someone help me with suggestion on how I can estimate this points. Here

android image gradient

雨燕双飞 提交于 2019-12-06 15:24:52
问题 I want to create a "glow" effect on top of an image. On dark it's almost working, but on bright images you can see a gray rectangle on image, as seen in below image: Here is my code: public static Bitmap drawModifiedImage(Bitmap bitmap) { Canvas bigCanvas = new Canvas(bitmap); Bitmap b = Bitmap.createBitmap(bitmap.getWidth(), 20, Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); c.drawColor(Color.TRANSPARENT); LinearGradient grad = new LinearGradient(bitmap.getWidth()/2, 0, bitmap.getWidth(

java: How to add Transparent Gradient Background to JFrame

拥有回忆 提交于 2019-12-06 14:45:53
问题 java: I want to use the Gradient style Transparent Background to JFrame. On the top the transparency should be 100% but when going down it should go on decreasing and at the bottom it should be 20% I know i can use the images already having such effect but i want to provide the themes facility and allowing user to use their favorite images but allow transparency at the run time. 回答1: Sun added support for translucent backgrounds to java in 6u10 but it is not formally described in the API. In

Image gradient on HTML5 canvas

时光总嘲笑我的痴心妄想 提交于 2019-12-06 14:29:39
问题 I would like to obtain a radial gradient effect on an image ( alpha = 1 in the middle and transparent on the edges). Do you have any ideeas on how I could do that? 回答1: If I'm not mistaking what you want to do is: Draw the image Draw a radial gradient over it, where the borders are transparent and the middle is opaque and using the globalCompositeOperation setting on the context to blend the transparency gradient with the image. You can rather easily translate this into code: http://jsfiddle

HTML5 Canvas - Banding with low alpha?

微笑、不失礼 提交于 2019-12-06 14:18:21
Introduction I'm currently developing a small drawing application similar to MugTug's Sketchpad . There's one pretty annoying issue I haven't managed to get around yet, though. Drawing Algorithm My basic draw algorithm is similar to the one used by MugTug. Basically it just stamps images using drawImage while the user is drawing. There's one serious handicap. The algorithm begins to fail with low alpha. You can see this easily in the MugTug's tool by setting brush settings in the following way: diameter -> 100, hardness -> 1, flow -> 100, opacity -> 2 (1 is too small! bug in the app?). There

WPF 3D - mapping gradient brush on complex geometry

你离开我真会死。 提交于 2019-12-06 11:56:45
问题 I wanted to ask if anyone knows how to map gradient brush on complex objects in WPF 3D. The result should look similar to 3D images in matlab (3D function for example). Lets say you have some 3-dimensional data you wish to visualize and you want to diferentiate certain levels of values by color. 回答1: Given a GradientBrush defined something like this: <LinearGradientBrush x:Name="RedYellowGradient"> <GradientStop Color="Blue" Offset="0.01" /> <GradientStop Color="Purple" Offset="0.25"/>

radial gradients in CSS3 [closed]

心已入冬 提交于 2019-12-06 11:04:25
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 2 years ago . I have some experience making linear gradients in CSS but I would really like to make a radial gradient similar to this image http://i.stack.imgur.com/T85xO.png Basically a light grey radial positioned at the bottom of the element Radial gradients are in an implementation mess right now, Safari doesn't support elliptical radial backgrounds (Webkit Nightly does, so support for

App crashes when using __bridge for CoreGraphics gradient on ARC

丶灬走出姿态 提交于 2019-12-06 10:38:08
I'm creating an application for iOS 5 and I'm drawing some gradients. The following gradient code I've always used before ARC, but now it does not work on my device anymore (however, it works on the simulator) when I use it several times (so I suppose it's a memory management issue). Anyways, here's the code: CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGFloat locations[] = { 0.0, 1.0 }; NSArray *colors = [NSArray arrayWithObjects:(__bridge id)startColor, (__bridge id)endColor, nil]; CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef) colors,

How to code adagrad in python theano

一笑奈何 提交于 2019-12-06 10:02:15
To simplify the problem, say when a dimension (or a feature) is already updated n times, the next time I see the feature, I want to set the learning rate to be 1/n. I came up with these codes: def test_adagrad(): embedding = theano.shared(value=np.random.randn(20,10), borrow=True) times = theano.shared(value=np.ones((20,1))) lr = T.dscalar() index_a = T.lvector() hist = times[index_a] cost = T.sum(theano.sparse_grad(embedding[index_a])) gradients = T.grad(cost, embedding) updates = [(embedding, embedding+lr*(1.0/hist)*gradients)] ### Here should be some codes to update also times which are