hyprwm / hyprlock

Hyprland's GPU-accelerated screen locking utility
BSD 3-Clause "New" or "Revised" License
599 stars 53 forks source link

Missing background image with JPEG image files #315

Closed rendam closed 3 days ago

rendam commented 2 months ago

When using the attached images as background hyprlock fails to load them and instead shows a gray or transparent background. The file size does not seem to be a problem, as PNG files with up to ~7MB are rendering fine. First I thought it has something to do with the mismatch of screen resolution 3440x1440 and image pixels but resizing it in GIMP did not change a thing. Only until I lossy compressed the resized image did it render.

My log and config: hyprlock.log

source = ~/.cache/wal/colors-kitty.conf

# BACKGROUND
background {
    monitor =
    path = ~/.config/swww/wall.set
    blur_passes = 3
    contrast = 0.8916
    brightness = 0.8172
    vibrancy = 0.1696
    vibrancy_darkness = 0.0
}

# GENERAL
general {
    no_fade_in = false
    grace = 0
    disable_loading_bar = true
}

# INPUT FIELD
input-field {
    monitor =
    size = 250, 60
    outline_thickness = 2
    dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
    dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
    dots_center = true
    outer_color = rgba(0, 0, 0, 0)
    inner_color = rgba(0, 0, 0, 0.5)
    font_color = rgb(200, 200, 200)
    fade_on_empty = false
    font_family = JetBrains Mono Nerd Font Mono
    placeholder_text = <i><span foreground="##cdd6f4">Input Password...</span></i>
    hide_input = false
    position = 0, -120
    halign = center
    valign = center
}

# TIME
label {
    monitor =
    text = cmd[update:1000] echo "$(date +"%-H:%M%p")"
    color = $foreground
    #color = rgba(255, 255, 255, 0.6)
    font_size = 120
    font_family = JetBrains Mono Nerd Font Mono ExtraBold
    position = 0, -300
    halign = center
    valign = top
}

# USER
label {
    monitor =
    text = Hi there, $USER
    color = $foreground
    #color = rgba(255, 255, 255, 0.6)
    font_size = 25
    font_family = JetBrains Mono Nerd Font Mono
    position = 0, -40
    halign = center
    valign = center
}

# CURRENT SONG
label {
    monitor =
    text = cmd[update:1000] echo "$(~/.rdots/scripts/whatsong.sh)" 
    color = $foreground
    #color = rgba(255, 255, 255, 0.6)
    font_size = 18
    font_family = JetBrainsMono, Font Awesome 6 Free Solid
    position = 0, 50
    halign = center
    valign = bottom
}

the resized and compressed image (working) Phoenix_edit-min

the working one: colors-1

not working images woodpath Phoenix

SakuraBlossomTree commented 1 month ago

I also tried to compress the JPEG image, it didn't work but when converting it to PNG it worked without needing to compress. Maybe change this in the wiki for now till someone finds a fix for this

JoelAlphonso commented 2 weeks ago

Same here can't seem to be able to use any JPEG images using the latest 0.3.0-1 release

shilkazx commented 2 weeks ago

Same here, convert jpg to png is a workaround. When using jpg, one monitor shows a black background, but another one show original content as background(I have two monitor).

rwtallant13 commented 2 weeks ago

Same thing happening here. Converting to png is temporary solution.