Introduce xcur2png package
All checks were successful
Build xcur2png / Build and push image (push) Successful in 1m26s
All checks were successful
Build xcur2png / Build and push image (push) Successful in 1m26s
This commit is contained in:
27
xcur2png/0001-fix-wrong-math.patch
Normal file
27
xcur2png/0001-fix-wrong-math.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From cda8f7af382f5c5f1e9a395eb03e2b819770d499 Mon Sep 17 00:00:00 2001
|
||||
From: Yuji Saeki <44311901+YujiSaeki@users.noreply.github.com>
|
||||
Date: Mon, 1 Jun 2020 22:32:16 +0200
|
||||
Subject: [PATCH 1/1] fix wrong math
|
||||
|
||||
Signed-off-by: Christian Hesse <mail@eworm.de>
|
||||
---
|
||||
xcur2png.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xcur2png.c b/xcur2png.c
|
||||
index 8723a10..f7dd95d 100644
|
||||
--- a/xcur2png.c
|
||||
+++ b/xcur2png.c
|
||||
@@ -586,9 +586,9 @@ int writePngFileFromXcur (const XcursorDim width, const XcursorDim height,
|
||||
unsigned int red = (pixels[i]>>16) & 0xff;
|
||||
unsigned int green = (pixels[i]>>8) & 0xff;
|
||||
unsigned int blue = pixels[i] & 0xff;
|
||||
- red = (div (red * 256, alpha).quot) & 0xff;
|
||||
- green = (div (green * 256, alpha).quot) & 0xff;
|
||||
- blue = (div (blue * 256, alpha).quot) & 0xff;
|
||||
+ red = (div (red * 255, alpha).quot) & 0xff;
|
||||
+ green = (div (green * 255, alpha).quot) & 0xff;
|
||||
+ blue = (div (blue * 255, alpha).quot) & 0xff;
|
||||
pix[i] = (alpha << 24) + (red << 16) + (green << 8) + blue;
|
||||
}
|
||||
|
||||
38
xcur2png/xcur2png.spec
Normal file
38
xcur2png/xcur2png.spec
Normal file
@@ -0,0 +1,38 @@
|
||||
%global build_type_safety_c 0
|
||||
|
||||
Name: xcur2png
|
||||
Version: 0.7.1
|
||||
Release: %autorelease -b2
|
||||
Summary: Convert X cursors to PNG images
|
||||
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://github.com/eworm-de/xcur2png
|
||||
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch: 0001-fix-wrong-math.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(xcursor)
|
||||
|
||||
%description
|
||||
xcur2png is a program which let you take PNG image from X cursor, and generate
|
||||
config-file which is reusable by xcursorgen. To put it simply, it is
|
||||
converter from X cursor to PNG image.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%{_bindir}/%{name}
|
||||
%{_mandir}/man1/%{name}.1.*
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
Reference in New Issue
Block a user