Resizing algorithms — how to deal with edges?

Started Feb 25, 2014 | Discussions thread
Shop cameras & lenses ▾
ForumParentFirstPreviousNextNext unread
Flat view
Mark Scott Abeln
Veteran MemberPosts: 6,761Gear list
Resizing algorithms — how to deal with edges?
Feb 25, 2014

A correspondent asked me to look into the implementation of bicubic image resampling algorithms, and is wondering how to deal with edges. Since the bicubic methods rely on a number of neighboring pixels, some method must be used to ‘fake’ the data along the edges.

Simply by looking at upsized Photoshop images, it appears that the pixels along the edges are duplicated, since an uprezed image appears to have a ‘border’ around it, with no diagonal detail. I tried the same thing with a generic cubic uprez in ImageMagick, and (while the output was considerably different) it still appeared to have a border artifact.

Is this considered acceptable to most developers, or are there better methods for faking the data? Other suggested methods include adding black pixels to the outside of the data, or duplicating some interior neighbor pixels to the outside.

Original, magnified 500%:

Photoshop bicubic from 100x100 to 172x172, magnified, with obvious border region:

My gut feeling is that duplicating the pixels to the outside is likely adequate, but perhaps some sort of extrapolation could be useful.

 Mark Scott Abeln's gear list:Mark Scott Abeln's gear list
Nikon D200 Nikon D7000 Nikon D750 Nikon AF-S DX Nikkor 35mm f/1.8G Nikon AF Nikkor 50mm f/1.8D +1 more
ForumParentFirstPreviousNextNext unread
Flat view
ForumParentFirstPreviousNextNext unread
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark post MMy threads
Color scheme? Blue / Yellow