Comments (4)
Thank you for the input!
from randomwallpapergnome3.
Hi everyone!
After using this extension with Reddit for three days I can confirm that this is really an issue. Every third or fourth image has portrait orientation and therefore looks very blurry when sized to 1920x1080 screen 😿
from randomwallpapergnome3.
Hi!
I'm not very familiar with how Gnome Extensions work, so I don't know how to create a visual setting for this in the GUI, but adding extra conditions to this filter expression here in the sourceAdapter.js file is pretty straightforward and seems to do the trick:
const submissions = JSON.parse(message.response_body.data).data.children.filter(child => {
if (child.data.post_hint !== 'image') return false;
if (require_sfw) return child.data.over_18 === false;
if (child.data.preview.images[0].source.width < 1920) return false;
if (child.data.preview.images[0].source.height < 1080) return false;
if (child.data.preview.images[0].source.height >= child.data.preview.images[0].source.width) return false;
return true;
});
The child.data.preview.images[0].source
object has a width and height variable, you can use them to specify arbitrary constraints.
Perhaps the best way to implement this would be to allow the user to specify constraints themselves? E.g. width > 1920, width > 2 * height
. Or if it's too complicated to parse, maybe three options, a minimum width, a minimum height, and a range of allowed aspect ratios?
Edit: Hmm it doesn't seem to work after a day of usage. I'm probably missing something...
from randomwallpapergnome3.
@attilakillin Thanks for the research and sorry for the late response! Unfortunately, the most time-consuming part for me is to fiddle around with the UI as well. Also, I'd guess that you should not use the "preview" image in the response. I'd guess it is a smaller version than the actual image for displaying in the browser?
from randomwallpapergnome3.
Related Issues (20)
- Settings window has unnecessary padding on Gnome 42
- Panel menu alignment is broken in Gnome 42
- Fedora 36 (PreRelease) HOT 1
- Auto-fetch is downloading multiple images HOT 3
- New Gnome's day/night theme not fully supported HOT 4
- [Feature request] Ability to "ban" or blacklist a wallpaper HOT 1
- Old settings might cause new extension versions to crash HOT 1
- [Feature Request] Use Local Images HOT 1
- An option for local files HOT 2
- Investigate the overhead of the local folder source implementation
- Make the fallback folder for the "Saved Images" clear
- Add a Favourite Images source
- Not compatible with gnome 44 HOT 4
- Requesting new wallpaper from terminal, HOT 2
- Improve aspect ratio filtering for Reddit HOT 1
- Remove option to select any color in Wallhaven color filtering
- Can't retrieve photos from unsplash HOT 5
- Support Gnome 45 HOT 13
- [v3] Adapt to latest HydraPaper version
- ubuntu 23.10 OS throwing this error HOT 2
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 randomwallpapergnome3.