Skip to main content
dont agree with change
Link

A simple command line interface to an image Image resizing library in Rust

deleted 505 characters in body
Source Link

Are there Rust features I could apply to optimize for simple test of a JPEG or PNG resized from 50002000 x 50002000 pixels to 150 x 150 pixels?

Background

I have been working with the image crate which provides some rich features that may be better suited to faster resize times like sampling methods and individual pixels. Perhaps there are no Rust features I could use to exploit this crate without contributing to it directly?

image: resize funtions
From my experience with other image libraries the thumbnail feature has always been the most optimized for accurate and fast down sampling.

extern crate image;
use std::env;

fn main() {
    let mut args = env::args();
    args.next();
    let file_location = args.next().unwrap();
    let width = args.next().unwrap().parse().unwrap();
    let height = args.next().unwrap().parse().unwrap();
    
    let img = image::open(file_location.as_str()).unwrap();
    
    // img.resize(width, height, image::imageops::Lanczos3);
    img.thumbnail(width, height);
}

Are there Rust features I could apply to optimize for simple test of a JPEG or PNG resized from 5000 x 5000 pixels to 150 x 150 pixels?

Background

I have been working with the image crate which provides some rich features that may be better suited to faster resize times like sampling methods and individual pixels. Perhaps there are no Rust features I could use to exploit this crate without contributing to it directly?

image: resize funtions
From my experience with other image libraries the thumbnail feature has always been the most optimized for accurate and fast down sampling.

extern crate image;
use std::env;

fn main() {
    let mut args = env::args();
    args.next();
    let file_location = args.next().unwrap();
    let width = args.next().unwrap().parse().unwrap();
    let height = args.next().unwrap().parse().unwrap();
    
    let img = image::open(file_location.as_str()).unwrap();
    
    // img.resize(width, height, image::imageops::Lanczos3);
    img.thumbnail(width, height);
}

Are there Rust features I could apply to optimize for simple test of a JPEG or PNG resized from 2000 x 2000 pixels to 150 x 150 pixels?

extern crate image;
use std::env;

fn main() {
    let mut args = env::args();
    args.next();
    let file_location = args.next().unwrap();
    let width = args.next().unwrap().parse().unwrap();
    let height = args.next().unwrap().parse().unwrap();
    
    let img = image::open(file_location.as_str()).unwrap();
    
    // img.resize(width, height, image::imageops::Lanczos3);
    img.thumbnail(width, height);
}
deleted 5 characters in body
Source Link

Are there were Rust features I could apply to optimize for simple test of a JPEG or PNG resized from 5000 x 5000 pixels to 150 x 150 pixels?

Background

I have been working with the image crate which provides some rich features that may be better suited to faster resize times like sampling methods and individual pixels. Perhaps there are no Rust features I could use to exploit this crate without contributing to it directly?

image: resize funtions
From my experience with other image libraries the thumbnail feature has always been the most optimized for accurate and fast down sampling.

extern crate image;
use std::env;

fn main() {
    let mut args = env::args();
    args.next();
    let file_location = args.next().unwrap();
    let width = args.next().unwrap().parse().unwrap();
    let height = args.next().unwrap().parse().unwrap();
    
    let img = image::open(file_location.as_str()).unwrap();
    
    // img.resize(width, height, image::imageops::Lanczos3);
    img.thumbnail(width, height);
}

Are there were Rust features I could apply to optimize for simple test of a JPEG or PNG resized from 5000 x 5000 pixels to 150 x 150 pixels?

Background

I have been working with the image crate which provides some rich features that may be better suited to faster resize times like sampling methods and individual pixels. Perhaps there are no Rust features I could use to exploit this crate without contributing to it directly?

image: resize funtions
From my experience with other image libraries the thumbnail feature has always been the most optimized for accurate and fast down sampling.

extern crate image;
use std::env;

fn main() {
    let mut args = env::args();
    args.next();
    let file_location = args.next().unwrap();
    let width = args.next().unwrap().parse().unwrap();
    let height = args.next().unwrap().parse().unwrap();
    
    let img = image::open(file_location.as_str()).unwrap();
    
    // img.resize(width, height, image::imageops::Lanczos3);
    img.thumbnail(width, height);
}

Are there Rust features I could apply to optimize for simple test of a JPEG or PNG resized from 5000 x 5000 pixels to 150 x 150 pixels?

Background

I have been working with the image crate which provides some rich features that may be better suited to faster resize times like sampling methods and individual pixels. Perhaps there are no Rust features I could use to exploit this crate without contributing to it directly?

image: resize funtions
From my experience with other image libraries the thumbnail feature has always been the most optimized for accurate and fast down sampling.

extern crate image;
use std::env;

fn main() {
    let mut args = env::args();
    args.next();
    let file_location = args.next().unwrap();
    let width = args.next().unwrap().parse().unwrap();
    let height = args.next().unwrap().parse().unwrap();
    
    let img = image::open(file_location.as_str()).unwrap();
    
    // img.resize(width, height, image::imageops::Lanczos3);
    img.thumbnail(width, height);
}
not about image resizing, but just calling something to do the resizing
Source Link
Shepmaster
  • 8.8k
  • 27
  • 28
Loading
deleted 410 characters in body
Source Link
Loading
deleted 410 characters in body
Source Link
Loading
added 12 characters in body
Source Link
Loading
edited tags
Link
200_success
  • 145.6k
  • 22
  • 191
  • 481
Loading
Source Link
Loading