Comments (14)
Yup. I'm seeing something similar here. Extremely subtle at first glance but take a look for yourself. I had a hunch and rolled resize back to the previous commit (like I did here).
resize git:(581d15c)
resize git:(bdfbbea)
from resize.
Could you tell me which size the input images have and to which size you're resizing them to? While doing the optimizations, I had some numerical instabilities that where only visible at certain scale ratios. I thought that I sorted that out. Doesn't seem to be the case.
from resize.
The original image is 600x450.
I rotated the image to 450x600.
I then processed it and the artifacts still exist.
from resize.
Interestingly cropping gifs doesn't appear to have the issue?
Gifs are being processed as RGBA where I'm thinking pngs and jpgs are coming across as YCbCr.
I noticed this function call is the primary difference in the process. Just an observation for now. Who knows if it has value.
https://github.com/nfnt/resize/blob/master/resize.go#L137
from resize.
A different gif sample to show it isn't being effected.
from resize.
This is the input image 28.jpg JPEG 320x180 320x180+0+0 8-bit DirectClass 11.3KB 0.000u 0:00.000
I'm resizing it so that the aspect ratio is kept, to a height of 630. Again, tried multiple filters, each seem to suffer from this in some form or another.
from resize.
Hey there, I'm seeing this too.
My sample image from unsplash.com (http://33.media.tumblr.com/537d8986d6b8df79a9fd6901e7174fe2/tumblr_nbk5oaEN2n1st5lhmo1_1280.jpg) is 1280x848. Downsampled to 320x212 and the image suffers heavily from artifacting.
from resize.
Fixed in 0c6a628. The indexes used for reading the input images values were faulty and led to these artifacts. Regression from ccddecd.
from resize.
Thanks so much for fixing this. This package is great by the way.
from resize.
Thank you!
from resize.
Hey @nfnt - I'm noticing the artifacts have returned using Go 1.3.1 and current resize. Here are the images:
The resize quality if really poor. I'm trying to gather more information. Oddly, I haven't noticed the issues when building from my other machine (same versions!). In both cases, I'm building with a target platform VM — so the environment is literally the same. It's strange!
from resize.
I can confirm the issue is on both my computers - I just didn't notice it on the laptop because it's retina and the @2x was getting shrunk in the browser.
from resize.
The artifacts you see are JPEG compression artifact and are not caused by this package. Try encoding the JPEG with a higher quality or encoding to a lossless image format like PNG.
from resize.
You're right. Sorry for the false alarm @nfnt — I just realized the standard jpeg library uses a 75% compression const when encoding, which I need to override.
Great work on the package!
from resize.
Related Issues (20)
- Benchmark HOT 2
- Don't reverse alpha premultiplication, it's fundamentally wrong HOT 6
- Resized image lost all metadata HOT 1
- 1px black border after resize png images HOT 2
- debian control file have hardcoded version. HOT 1
- Transparent images cause black coloring HOT 1
- panic: index out of range when resize some picture HOT 4
- ycc.go:126: undefined: image.YCbCrSubsampleRatio440 HOT 1
- Panic on Resize HOT 6
- Please version this repository HOT 1
- Increased file size after resizing (downscaling) HOT 4
- image not show on mobile browser after resizing HOT 1
- Panic on resize 2 HOT 2
- Detecting file format HOT 3
- Resizing animated gif HOT 1
- I'm no longer updating this package. HOT 6
- Error output is generated
- png image format is not recognized HOT 1
- High memory usage when processing many high-resolution images
- can you supper tiff
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resize.