Skip to content

Instantly share code, notes, and snippets.

View juan-cardelino's full-sized avatar

Juan Cardelino juan-cardelino

View GitHub Profile
@juan-cardelino
juan-cardelino / gist:8398855
Created January 13, 2014 11:37
imagemagick memory problem
==2931== Memcheck, a memory error detector
==2931== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==2931== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==2931== Command: test_memory
==2931==
==2931== WARNING: Support on MacOS 10.8/10.9 is experimental and mostly broken.
==2931== WARNING: Expect incorrect results, assertions and crashes.
==2931== WARNING: In particular, Memcheck on 32-bit programs will fail to
==2931== WARNING: detect any errors associated with heap-allocated data.
==2931==
if (pconf->m_effectName == "lipstick1") {
opacityStd = pconf->getAlpha("multiply");
opacityMax = pconf->getAlphaMax("multiply");
opacityMin = pconf->getAlpha("lighten");
} else if (pconf->m_effectName == "lipstick2") {
opacityStd = pconf->getAlpha("overlay");
opacityMax = pconf->getAlphaMax("overlay");
opacityMin = pconf->getAlpha("black");
} else if (pconf->m_effectName == "lipstick3") {
//opacityStd = pconf->getAlpha("overlay");
void rgb_to_hsv_doubles(double *out, double *in)
34 {
35 assert_rgb(in);
36 double r, g, b, h, s, v, M, m;
37 r = in[0]; g = in[1]; b = in[2];
38
39 //printf("rgb %g,%g,%g...\n", r, g, b);
40
41 if (g >= r && g >= b) {
42 M = g;