Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Naming poll: Scaling images without smoothing
- By jlnr (dev) Date 2009-07-17 15:09
I saw you blogging about OpenGL texture scaling filters, was this related to Gosu? If so, did you join the club of people who sneakily set the MAX_FILTER using ruby-opengl? ;)

In either case, we have been discussing adding this feature natively on IRC a while ago. Let me know if you can come up with a good name for "scale by doing pixel repetition" as an alternative to :default and :tileable ;)
- By Maverick Date 2009-07-17 23:14
ScaledTile?
- By benko Date 2009-07-18 12:18

>In either case, we have been discussing adding this feature natively on IRC a while ago. Let me know if you can come up with a good name for "scale by doing pixel
>repetition" as an alternative to :default and :tileable ;)


:retro ;)

Isn't its real name bilinear filter? What's wrong with :bilinear ?
- By jsb Date 2009-07-18 16:19
If Gosu adapts the concept of optional parameters, I'd like to have these for Image.new:

:interpolation => :bilinear, :edges => :soft (for sprites, default)
:interpolation => :bilinear, :edges => :hard (for tiles)
:interpolation => :nearest_neighbor (for retro-style scaling)
- By jlnr (dev) Date 2009-07-18 20:54
Well, they are always scaled. :default would be the current hard_borders=false (just smoothen and blur everything), :tileable means smoothen everything except the edges, and the new flag would mean that everything is just handled by repeating pixels.
- By jlnr (dev) Date 2009-07-18 21:05
Yep, it's planned that it will indeed be Image#new(filename_or_rmagick, args = {}) :)

Hmm, I'll think about it, but so far I would prefer the name to be more practical (like :retro). Or just :interpolation=true/false? Hmm. Maybe I'll turn this into a poll later ;)
- By Maverick Date 2009-07-18 23:55
:repeating?
- By jlnr (dev) Date 2009-07-19 01:56
I fear that sounds even more as if the image would be tiled over the scaled area, which is why "nearest neighbor" is probably a better term than "pixel repeating" :)
- By Maverick Date 2009-07-19 03:27
:pixel_repeat?
- By ? Date 2009-07-25 10:19
vow for

:nearest

since it's GL_NEAREST
also photoshop uses the term "nearest neighbor" scaling
Up Topic Gosu / Gosu Exchange / Naming poll: Scaling images without smoothing

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill