I want to do an initial check for an image's dimensions. If it is greater than 1000, then I want to apply a resize. Is this the right way to approach the problem? I'm creating an image twice. 1st time via MiniMagic to grab the dimensions and then through ImageProcessing to perform the actual resize. (I'm wondering if there's a way to do this all via 1 library)
@blob.open do |file|
image_to_convert = MiniMagick::Image.open(file.path)
if(image_to_convert.width > MAX_WIDTH)
processed = ImageProcessing::MiniMagick.source(file.path).convert("png").resize_to_limit!(1000, 1000)