1. A method of filtering a digital image, comprising in a device having one or more processors and memory storing one or more programs to be executed by the one or more processors: for each respective pixel in a set of pixels of the digital image, generating a pixel-dependent filter kernel for the respective pixel, and applying the filter kernel to the respective pixel to smooth noise and preserve spatial frequencies associated with image edges in the digital image in accordance with a first filtering parameter, wherein the filter kernel is a closed-form function of the respective pixel, the closed-form function including contributions from a first set of neighboring pixels, wherein the contribution from each respective neighboring pixel in the first set of neighboring pixels is determined at least in part by a conductivity function evaluated in accordance with a difference in intensity between the respective pixel and the respective neighbor pixel, the conductivity function mapping quantized input values to a finite number of predefined conductivity function values, and wherein the filter kernel for each respective pixel in the set of pixels has a content-dependent normalization specific to the respective pixel such that a sum of values of elements in the filter kernel equals a substantially fixed value.