harold Posted September 5, 2012 Share Posted September 5, 2012 (edited) "Content Aware Resize" is a little effect I've written in a couple of hours that uses Seam Carving to make an image less wide in a way that somewhat respects the content. It probably shouldn't really be an effect because it effectively changes the size of the picture, but there is little choice.. so it just leaves some transparent space, which works well enough. As you can see in the source, I use an ugly hack to render only once. It's fundamentally impossible to render it in parts - it has to calculate the globally least-energy seam, which means it has to look at the entire image all at once (well the entire selection really, but I had no idea how to do that). Once it knows the seam it could theoretically build the output row by row, I suppose. Is there a good way to render just once, preferrably in a way that handles rectangular selections? edit: I know the code is lame and I recalculate far too much for every seam, I'll fix that later.. ContentAwareResize.zip Edited September 5, 2012 by harold Quote I would write plugins, if I knew what kind of plugins were needed.. Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.