         clippingPath.addClip()
         image.draw(in: CGRect(origin: CGPoint.zero, size: imageSize))
 
-        if let cgColor = color?.cgColor {
-            UIGraphicsGetCurrentContext()?.setStrokeColor(cgColor)
-
-            let border = UIBezierPath(roundedRect: rect, cornerRadius: radius)
-
-            border.stroke()
+        if let border = border, let context = UIGraphicsGetCurrentContext() {
+            context.setStrokeColor(border.color.cgColor)
+
+            let path = UIBezierPath(roundedRect: rect, cornerRadius: radius)
+            path.lineWidth = border.width
+
+            path.stroke()
         }
 
         guard let roundedImage = UIGraphicsGetImageFromCurrentImageContext()?.cgImage else {

        }

        public func process(image: UIImage, context: ImageProcessingContext?) -> UIImage? {
            return image.processed.byAddingRoundedCorners(radius: radius.converted(to: unit), color: border?.color)
        }

        public var identifier: String {

// MARK: - ImageProcessor.RoundedCorners

extension ImageProcessor {
    public struct Border: Hashable {
        let color: UIColor
        let width: CGFloat

        public init(color: UIColor, width: CGFloat = 1) {
            self.color = color
            self.width = width
        }

        public var description: String {
            return "Border(color: \(color), width: \(width))"
        }
    }

    /// Rounds the corners of an image to the specified radius.
    ///
    /// - warning: In order for the corners to be displayed correctly, the image must exactly match the size
    /// of the image view in which it will be displayed. See `ImageProcessor.Resize` for more info.
    public struct RoundedCorners: ImageProcessing, Hashable, CustomStringConvertible {
        private let radius: CGFloat
        private let unit: Unit
        private let border: Border?
