Sphinx.
![]() |
I'm trying to figure out how to find the percentage value that will result in a width of 1 pixel in the final image. I don't think it is possible, but perhaps there is some indirect way this percentage value can be retrieved. For example if the image is 50 pixels wide, I need the percentage value 0.5 - but this should ofcourse scale to all input sizes.
Think of the offset component - how do I configure e.g. the horizontal offset so it only offsets one pixel? Is it impossible? If so, it would really be cool with a new helper component that gives you the either the horizontal or vertical percentage scale constants for 1 pixel. |
|||
Posted: December 27, 2007 6:38 am | ||||
Kraellin
![]() |
spinx,
i think this answer is already on the forums somewhere, and not that long ago...i think. If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: December 27, 2007 9:08 am | ||||
Sphinx.
![]() |
Any specific hints? I already searched without luck.. |
|||
Posted: December 27, 2007 9:16 am | ||||
Kraellin
![]() |
no, not really. when uber and dilla and you and vlad start talking tech, i pack up and go argue about copyrights and licenses
![]() but, it wasnt that long ago, certainly not a year ago. more like a couple or three months back at the most, i would say. and it had to do with moving an offset by one pixel regardless of image size. that's the part i do recall. so, maybe search 'pixel'? If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: December 27, 2007 1:38 pm | ||||
Mousewrites
![]() |
||||
Posted: December 27, 2007 2:12 pm | ||||
Sphinx.
![]() |
Been there already, no good. It would be easy to grab the calculator and calculate the relative percentage for a given image - but I want to find some generic approach... I don't think its possible ![]() |
|||
Posted: December 27, 2007 2:29 pm | ||||
Kraellin
![]() |
i think that was the conclusion in the other thread as well. If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: December 27, 2007 3:05 pm | ||||
ThreeDee
![]() |
Hi Sphinx,
I took up your challenge and made a slider-based solution for offsetting an image by pixel, which works in the image-size range of 10 to 1000 pixels. (I'm attaching the filter file here -- hopefully comes through) The user has to input the image size using a slider (and a checkbox to extend the range from 100 to 1000), and the filter does the calculation based on it. Of course, only works correctly at the right slider value. As to the mathematics involved, I used the bias curve to convert the slider input to a percentage. (The final percentage is expressed by luminosity. You'll have to look at the filter to see how this works.) Hope this helps. If so, I'll submit it as a snippet. TD Pixel-based offset.ffxml |
|||
Posted: December 29, 2007 5:53 pm | ||||
Sphinx.
![]() |
Interesting solution TD
![]() However it relies on the user to input the correct values - we cant trust them to do that ![]() ![]() Due to something that looks like a bug in the motion blur (when directional = 100), I found a way to offset x + 1, y - 1 (see the attached filter), this can probably be extended to do all directions and pixel offsets - but if it is really a bug, its probably not wise to rely on it.. Motion Blur Bug Offset.ffxml |
|||
Posted: December 30, 2007 5:28 am | ||||
Sphinx.
![]() |
Generic solution found!
The attached filter exploits the motion blur offset issue (dunno if it really is a bug..) to find the correct 1 pixel relative offset values. When a slider is positioned in the middle (value 2), there is no offset. Value = 1 equals a -1 pixel offset, value = 3 equals a +1 pixel offset. This approach or a modification of it can be used to control any offset or percentage input with exact pixel measures. 1 Pixel Offset.ffxml |
|||
Posted: December 30, 2007 9:45 am |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,533 Posts
+38 new in 30 days!
15,348 Topics
+73 new in year!
26 unregistered users.