AlexDisler / cordova-icon

Automatic icon resizing for Cordova
MIT License
689 stars 292 forks source link

🆕 Remove image transparency from iOS icon-1024.png #109

Open WuglyakBolgoink opened 6 years ago

WuglyakBolgoink commented 6 years ago

add new command: --i1024bg= (color can be red,blue,#fff,#e2e2e2)

ccorcos commented 6 years ago

Hmm. I couldnt get this to work...

WuglyakBolgoink commented 6 years ago

@ccorcos

image

cordova-icon --icon=../original.png --i1024bg=magenta
ccorcos commented 6 years ago

Hmm, i thought --i1024bg is optional...

On Thu, 9 Nov 2017 at 00:27 Wuglyak Bolgoink notifications@github.com wrote:

@ccorcos https://github.com/ccorcos

[image: image] https://user-images.githubusercontent.com/2271337/32595412-2bb68186-c530-11e7-8b60-be0b579092e0.png

cordova-icon --icon=../original.png --i1024bg=magenta

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AlexDisler/cordova-icon/pull/109#issuecomment-343081745, or mute the thread https://github.com/notifications/unsubscribe-auth/ABth3xZymk6DCqPiaKlJ8zGY1UPQLntzks5s0reDgaJpZM4QWhd6 .

BryanH commented 6 years ago

@ccorcos It is. If not specified, it defaults to white. Look at line 17 of index.js in the PR

ccorcos commented 6 years ago

Yeah, I see that works, but the icon is not showing up when I build the app...

WuglyakBolgoink commented 6 years ago

@ccorcos which cordova-ios version you have?

try

cordova platform rm ios --save --fetch
cordova platform add ios@4.5.3 --save --fetch
ccorcos commented 6 years ago

4.4.0

On Thu, 30 Nov 2017 at 00:20 Wuglyak Bolgoink notifications@github.com wrote:

@ccorcos https://github.com/ccorcos which cordova-ios version you have?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AlexDisler/cordova-icon/pull/109#issuecomment-348115112, or mute the thread https://github.com/notifications/unsubscribe-auth/ABth3xECyge00X4yab-Nf4xgkS0-NAf8ks5s7mUxgaJpZM4QWhd6 .

WuglyakBolgoink commented 6 years ago

@ccorcos in cordova-ios <v4.5.2 there are no automatically changes in *-info.plist files or in other files. You should do it manually!

See: https://cordova.apache.org/announcements/2017/10/16/ios-release.html

After I upgraded until v4.5.3 and generated icons, all was OK!

ccorcos commented 6 years ago

Alright. In my config.xml:

    <engine name="ios" spec="4.5.4" />

In my package.json:

        "cordova-icon": "git://github.com/WuglyakBolgoink/cordova-icon#9ad9e153557ad99be93f9c27f3d58d40e0dc66c0",

Here's the code I'm running.

$(dirname $0)/../../../node_modules/.bin/cordova-icon \
    --config=$(dirname $0)/../config.xml \
    --icon=$(dirname $0)/../$ICON_NAME \
    --i1024bg="#fff"

When I build the application, there no icon...

ccorcos commented 6 years ago

I used console.log right here and apparently, I was getting an error that wasn't bubbling up for some reason. I tried to find the bug, but I couldnt figure out why the application wasnt crashing or logging.

{ Error: Command failed: convert: unable to load module '/usr/local/Cellar/imagemagick/7.0.5-4/lib/ImageMagick//modules-Q16HDRI/coders/png.la': file not found @ error/module.c/OpenModule/1279.
convert: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/509.
convert: no images defined `platforms/ios/Notion Local/Images.xcassets/AppIcon.appiconset/AppIcon24x24@2x.png' @ error/convert.c/ConvertImageCommand/3254.

    at ChildProcess.<anonymous> (/Users/chet/Code/notion-next/node_modules/imagemagick/imagemagick.js:88:15)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:557:12) timedOut: false, killed: false, code: 1, signal: null }

I just had to brew upgrade imagemagick and it worked! Merge it!

ccorcos commented 6 years ago

@AlexDisler ^

gleb-britecore commented 6 years ago

@AlexDisler Any updates if we can merge it?