PMXBOT Log file Viewer

Help | Karma | Search:

#pil logs for Friday the 8th of November, 2013

(Back to #pil overview) (Back to channel listing) (Animate logs)
[00:00:33] <wiredfool> hmm. there's been work on palettes in the last 6 months
[00:00:57] <wiredfool> what version/platform did it work on, and what are you on now?
[00:01:29] <naringas> i'm on arch, i do think maybe my underlying libs may be the problem
[00:01:38] <naringas> i was about to check on an ubuntu vps
[00:02:43] <wiredfool> iirc, gif is pure python
[00:02:57] <wiredfool> what about pil/pillow versions?
[00:04:28] <naringas> 2.2.1 has this problem
[00:04:53] <naringas> the vps has 2.0.0 and seems to have worked
[00:08:13] <naringas> trying 2.2.1 in the ubuntu box
[00:10:06] <naringas> 2.2.1 also doesn't work
[00:10:11] <naringas> on either box
[00:14:13] <naringas> and it works in 2.1.0
[00:15:00] <naringas> imma file a github issue
[00:16:11] <wiredfool> ok
[00:16:35] <wiredfool> can you tell if it's just your image, or if it's gifs in general?
[00:17:29] <naringas> hmm, I used 75 different gifs, though they were all generated the same way
[00:17:42] <naringas> all the tests were made wiht the same gif
[00:19:33] <wiredfool> does it do it with https://github.com/python-imaging/Pillow/blob/master/Images/lena.gif ?
[00:19:34] <naringas> if i do a im2.show() it looks fine
[00:20:18] <wiredfool> probably since it's an rgb image at that point, and save writes a ppm, iirc for the display program to show
[00:21:09] <naringas> it borks it
[00:21:23] <wiredfool> ok.
[00:21:43] <wiredfool> good. or, at least, it's a lot easier if we've already got a test image in the distro
[00:21:54] <naringas> http://imagebin.org/276129
[00:21:56] <wiredfool> looks like the gif tests basically do a smoke test
[00:22:59] <wiredfool> we need to do a full round trip, save open, assert_equal_image
[00:25:17] <naringas> what should I call the issue ?
[00:25:27] <naringas> "gif palette breaks" is my best call
[00:26:06] <wiredfool> eh, something with gif, save, and fail
[00:26:19] <wiredfool> though palette is good too
[00:26:49] <naringas> https://github.com/python-imaging/Pillow/issues/403
[00:30:23] <naringas> gotta go, thanks btw
[00:30:31] <wiredfool> sure thing. I'm here all week
[02:20:33] <basichash> Does pillow have edge-detection functionality? I'm trying to change the color of a T-Shirt (image), leaving surroundings the same
[03:48:35] <wiredfool> basichash: It'd be tough
[03:48:52] <basichash> wiredfool: it doesn't seem like it'd be too bad
[03:49:13] <wiredfool> is it a photo? or cartoon?
[03:49:17] <basichash> photo
[03:49:56] <wiredfool> do you have a mask?
[03:50:09] <basichash> wiredfool: as in a base image?
[03:50:49] <wiredfool> no, I guess that's what you're looking for
[03:53:34] <basichash> but because it's the same image, I could reduce the search plane to a rectangle around the shirt, then from there I could search for all pixels in range(darker shade of white, lighter shade of white) and once I've got those values, I should easily be able to change shading etc
[03:53:50] <wiredfool> If you can get the mask, a grayscale image which defines shirt vs not shirt, you should be able to manipulate just those pixels.
[03:54:12] <basichash> wiredfool: ah ok I see what you mean
[03:54:18] <wiredfool> the mask might be really easy to get in one of the color channels, cmyk or lab
[03:54:42] <wiredfool> but that's the sort of thing that I tend to do in PS, since it's so much easier to visualize
[03:54:59] <basichash> does PS have an api?
[03:55:31] <wiredfool> no. but if you've got one shirt mask, you can apply the colors repeatedly
[03:56:05] <wiredfool> what's the current tshirt/bg/design colors?
[03:56:27] <basichash> wiredfool: yeah that's true. So all i'd need is the original image and the mask image, and from there I could use PIL to do the rest?
[03:56:38] <wiredfool> yeah.
[03:56:48] <basichash> wiredfool: haven't decided yet, but they'll be standard generic colors
[03:57:00] <basichash> no shading differentials
[03:57:06] <wiredfool> I mean, to pull the mask
[03:57:15] <basichash> oh
[03:57:38] <wiredfool> If it's white T on not-white, with no logo, that's not going to be hard
[03:58:04] <wiredfool> you might even be able to convert to gs, jack the contrast, and paste that into the mask/alpha channel
[03:58:34] <basichash> wiredfool: haha ok i understood very little of that. my image manipulation knowledge is pretty poor
[03:59:08] <wiredfool> ah.
[03:59:25] <wiredfool> can you show me the image?
[04:00:30] <basichash> wiredfool: like this: http://rlv.zcache.co.uk/personalized_large_t_shirt-ra94f815fc1b64874b9852669869d7960_804gs_324.jpg
[04:00:55] <basichash> haven't yet got the images done, but that's roughly what it'll be like
[04:26:24] <wiredfool> ok. interestingly enough, the white shirt is exactly gray
[04:26:33] <wiredfool> which is useful
[04:27:33] <wiredfool> I bet that if you took anything that was 255,255,255, or not completely gray, then you'd get a mask
[04:29:22] <wiredfool> which you could then use for pasting a semi transparent color on top of.