Skip to content

Commit

Permalink
Remove background of images
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jun 3, 2021
1 parent 15ef687 commit 6cb257e
Show file tree
Hide file tree
Showing 136 changed files with 29 additions and 0 deletions.
Binary file modified admin/icons/101_hm-sen-db-pcb_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/102_hm-es-tx-wm_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/103_hm-sen-mdir-wm55_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/104_hm-sec-sd-2_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/105_hm-sec-sd-2-team_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/107_hm-es-pmsw1-pl-R2_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/107_hm-es-pmsw1-pl-R3_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/107_hm-es-pmsw1-pl-R4_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/107_hm-es-pmsw1-pl-R5_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/108_hm-rc-dis-h-x-eu_thump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/109_hm-lc-sw1-pl-ct_thump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/110_hm-es-pmsw1-dr_thump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/111_hm-lc-rgbw-wm_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/112_hmip-wrc2_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/113_hmip-psm_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/114_hm-lc-dim1t-fm-lf_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/114_hm-lc-dim1t-fm-lf_thumb_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/114_hm-lc-dim1t-fm-lf_thumb_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/115_hm-es-pmsw1-sm_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/117_hm-ou-cfm-tw_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/117_hm-sec-sir-wm_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/118_hmip-swdo_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/119_hmip-rc8_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/120_hmip-etrv_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/121_hmip-wth_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/icons/123_oligo.smart.ip.hm_thumb.png
Binary file modified admin/icons/124_hm-sec-mdir_thumb.png
Binary file modified admin/icons/125_hmip-smi_thumb.png
Binary file modified admin/icons/126_hm-sen-li-o_thumb.png
Binary file modified admin/icons/127_hm-wds30-ot2-sm-2_thumb.png
Binary file modified admin/icons/13_hm-ws550sth-i_thumb.png
Binary file modified admin/icons/143_hm-lc-dim1t-dr_thumb.png
Binary file modified admin/icons/14_hm-sec-key_thumb.png
Binary file modified admin/icons/15_hm-sec-win_thumb.png
Binary file modified admin/icons/16_hm-sec-sc_thumb.png
Binary file modified admin/icons/17_hm-sec-rhs_thumb.png
Binary file modified admin/icons/18_hm-rc-4_thumb.png
Binary file modified admin/icons/19_hm-rc-12_thumb.png
Binary file modified admin/icons/20_hm-rc-19_thumb.png
Binary file modified admin/icons/21_hm-rc-p1_thumb.png
Binary file modified admin/icons/22_hm-rc-sec3-b_thumb.png
Binary file modified admin/icons/23_hm-rc-key3-b_thumb.png
Binary file modified admin/icons/24_hm-cen-3-1_thumb.png
Binary file modified admin/icons/25_hm-em-cmm_thumb.png
Binary file modified admin/icons/26_hmw-lc-sw2-dr_thumb.png
Binary file modified admin/icons/27_hmw-lc-bl1-dr_thumb.png
Binary file modified admin/icons/28_hmw-lc-dim1l-dr_thumb.png
Binary file modified admin/icons/29_hmw-io-4-fm_thumb.png
Binary file modified admin/icons/2_hm-lc-dim1l-cv_thumb.png
Binary file modified admin/icons/30_hmw-io-12-sw7-dr_thumb.png
Binary file modified admin/icons/31_hmw-wse-sm_thumb.png
Binary file modified admin/icons/32_hmw-wsth-sm_thumb.png
Binary file modified admin/icons/33_hmw-sec-tr-fm_thumb.png
Binary file modified admin/icons/34_hmw-sys-tm_thumb.png
Binary file modified admin/icons/35_hmw-sys-tm-dr_thumb.png
Binary file modified admin/icons/36_hmw-sys-ps7-dr_thumb.png
Binary file modified admin/icons/38_hm-pbi-4-fm_thumb.png
Binary file modified admin/icons/39_hm-swi-3-fm_thumb.png
Binary file modified admin/icons/3_hm-lc-sw4-sm_thumb.png
Binary file modified admin/icons/42_hm-cc-tc_thumb.png
Binary file modified admin/icons/43_hm-cc-vd_thumb.png
Binary file modified admin/icons/44_hm-em-ccm_thumb.png
Binary file modified admin/icons/45_hm-lc-dim2l-sm_thumb.png
Binary file modified admin/icons/46_hm-lc-sw4-pcb_thumb.png
Binary file modified admin/icons/47_hm-sec-tis_thumb.png
Binary file modified admin/icons/48_hm-sen-ep_thumb.png
Binary file modified admin/icons/49_hm-sec-wds_thumb.png
Binary file modified admin/icons/4_hm-lc-sw1-fm_thumb.png
Binary file modified admin/icons/50_hm-sec-mdir_thumb.png
Binary file modified admin/icons/51_hm-sec-sd_thumb.png
Binary file modified admin/icons/52_hm-sec-sd-team_thumb.png
Binary file modified admin/icons/53_hm-sen-mdir-sm_thumb.png
Binary file modified admin/icons/54_hm-lc-ddc1-pcb_thumb.png
Binary file modified admin/icons/54_lc-ddc1-pcb_thumb.png
Binary file modified admin/icons/54a_lc-ddc1_thumb.png
Binary file modified admin/icons/55_hm-sec-sfa-sm_thumb.png
Binary file modified admin/icons/56_hmw-sen-sc-12-dr_thumb.png
Binary file modified admin/icons/57_hm-cc-scd_thumb.png
Binary file modified admin/icons/58_hmw-sen-sc-12-fm_thumb.png
Binary file modified admin/icons/59_hmw-io-12-fm_thumb.png
Binary file modified admin/icons/5_hm-lc-sw2-fm_thumb.png
Binary file modified admin/icons/60_hm-ou-cf-pl_thumb.png
Binary file modified admin/icons/61_hm-lc-bi1-pb-fm_thumb.png
Binary file modified admin/icons/61_hm-lc-bl1-pb-fm_thumb.png
Binary file modified admin/icons/64_hm-lc-dim2T-sm_thumb.png
Binary file modified admin/icons/65_hm-lc-dim1t-fm_thumb.png
Binary file modified admin/icons/66_hm-lc-dim1t-cv_thumb.png
Binary file modified admin/icons/67_hm-sci-3-fm_thumb.png
Binary file modified admin/icons/68_hm-lc-sw4-dr_thumb.png
Binary file modified admin/icons/69_hm-lc-sw2-dr_thumb.png
Binary file modified admin/icons/6_hm-lc-bl1-sm_thumb.png
Binary file modified admin/icons/70_hm-pb-4dis-wm_thumb.png
Binary file modified admin/icons/71_hmw-io-12-sw14-dr_thumb.png
Binary file modified admin/icons/72_hm-rc-brc-h_thumb.png
Binary file modified admin/icons/73_hm-atent_thumb.png
Binary file modified admin/icons/75_hm-pb-2-wm55_thumb.png
Binary file modified admin/icons/76_hm-lc-sw4-wm_thumb.png
Binary file modified admin/icons/77_hm-lc-sw1-ba-pcb_thumb.png
Binary file modified admin/icons/78_hm-ou-led16_thumb.png
Binary file modified admin/icons/7_hm-lc-bl1-fm_thumb.png
Binary file modified admin/icons/80_hm-sen-mdir-o_thumb.png
Binary file modified admin/icons/81_hm-dis-td-t_thumb.png
Binary file modified admin/icons/82_hm-sen-wa-od_thumb.png
Binary file modified admin/icons/83_hm-cc-rt-dn_thumb.png
Binary file modified admin/icons/84_hm-rc-4-2_thumb.png
Binary file modified admin/icons/84_hm-rc-4-x_thumb.png
Binary file modified admin/icons/85_hm-rc-key4-2_thumb.png
Binary file modified admin/icons/86_hm-pb-6-wm55_thumb.png
Binary file modified admin/icons/87_hm-sen-rd-o_thumb.png
Binary file modified admin/icons/88_hm-lc-sw4-ba-pcb_thumb.png
Binary file modified admin/icons/8_hm-lc-sw1-sm_thumb.png
Binary file modified admin/icons/95_group_hm-cc-vg-1_thumb.png
Binary file modified admin/icons/9_hm-ws550-us_thumb.png
Binary file modified admin/icons/CCU2_thumb.png
Binary file modified admin/icons/IP65_G201_thumb.png
Binary file modified admin/icons/OM55_DimmerSwitch_thumb.png
Binary file modified admin/icons/PushButton-2ch-wm_thumb.png
Binary file modified admin/icons/PushButton-4ch-wm_thumb.png
Binary file modified admin/icons/TH_CS_thumb.png
Binary file modified admin/icons/WeatherCombiSensor_thumb.png
Binary file modified admin/icons/group_hm-cc-vg-1.png
Binary file modified admin/icons/hm-coupling-dim.png
Binary file modified admin/icons/hm-coupling-group.png
Binary file modified admin/icons/hm-coupling-onoff.png
Binary file modified admin/icons/hm-coupling-rgb-dim.png
Binary file modified admin/icons/hm-coupling-rgb.png
Binary file modified admin/icons/hm-coupling-rgbw-dim.png
Binary file modified admin/icons/hm-coupling-rgbw.png
Binary file modified admin/icons/hm-coupling-white-dim.png
Binary file modified admin/icons/hm-coupling-white.png
Binary file modified admin/icons/hm-hue_gateway.png
Binary file modified admin/icons/hm-lightify_gateway.png
Binary file modified admin/icons/hm_resc-win-pcb-sc_thumb.png
Binary file modified admin/icons/hmip_brc2.png
29 changes: 29 additions & 0 deletions admin/icons/removeBackground.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const fs = require('fs');
const { exec } = require("child_process");


const files = fs.readdirSync(__dirname).filter(n => n.endsWith('.png'));

function getSize(name) {
return new Promise(resolve =>
exec(`imageMagic\\identify -ping -format %[fx:w]x%[fx:h] ${name}`, (error, stdout, stderr) => {
const [x,y] = stdout.split('x');
resolve({x: x - 1, y: y - 1});
}));
}

async function buildLines() {
const lines = [];
for (let n = 0; n < files.length; n++) {
const name = files[n];
console.log(n + ' / ' + files.length);
const size = await getSize(name);
lines.push(`imageMagic\\magick ${name} -fill none -draw "alpha 0,0 floodfill" -draw "alpha ${size.x}, ${size.y} floodfill" -draw "alpha 0,${size.y} floodfill" -draw "alpha ${size.x},0 floodfill" -channel alpha -blur 0x2 result\\${name}`);
lines.push(`imageMagic\\magick.exe result\\${name} -brightness-contrast 0x10 result\\${name}`);
}

fs.writeFileSync(__dirname + '\\remove.bat', lines.join('\n'));
}

buildLines();

Binary file modified admin/icons/unknown_device_thumb.png

0 comments on commit 6cb257e

Please sign in to comment.