B4J Question Standalone package ICON format

Kevin Hartin

Active Member
Licensed User
I have tried numerous formats for the ICON fole, but always results in the same error;

error:
d:\Documents\B4X\BmT Consumer\B4J\Objects\temp\build\BmT Consumer.exe: error CS1567: Error generating Win32 resource: Error reading icon 'd:\Documents\B4X\BmT Consumer\B4J\Objects\temp\icon.ico' -- The data is invalid.

What is the exact format needed to get this working? Is there a reliable tool or converter?

Thanks,
Kev
 

Kevin Hartin

Active Member
Licensed User
This is my favorite free online image editor that allows you save as Windows ICO file.
Thanks, I used it to create an ICO file, but still no luck.

I thought it may be something to do with a space in a directory name, so I elimanated that as well, but no luck...
ERROR:
B4JPackager11 Version 1.40
Exe name: BmTconsumer.exe
build folder: D:\DOCUME~1\B4X\BMT_CO~1\B4J\Objects\temp\build
InputJar: D:\Documents\B4X\BmT_Consumer\B4J\Objects\BmT_Consumer.jar
Running: D:\DOCUME~1\B4X\BMT_CO~1\B4J\Objects\temp\FindDosPath.exe
Running: C:\Program Files\Java\jdk-11.0.1\bin\jar
Package name: com.bookingmy.travel.consumer
Running: C:\Program Files\Java\jdk-11.0.1\bin\jdeps
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [jdk.charsets, jdk.crypto.ec, java.base, java.desktop, java.logging, java.sql, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, java.scripting, java.xml, jdk.unsupported, java.datatransfer, jdk.unsupported.desktop, jdk.jsobject, jdk.xml.dom]
Running: C:\Program Files\Java\jdk-11.0.1\bin\javac
.
Running: C:\Program Files\Java\jdk-11.0.1\bin\jar
.
Running: C:\Program Files\Java\jdk-11.0.1\bin\jlink
.
.
.
.
.
.
.
Running: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\csc.exe
.
Microsoft (R) Visual C# Compiler version 4.8.4084.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240
d:\Documents\B4X\BmT_Consumer\B4J\Objects\temp\build\BmTconsumer.exe: error CS1567: Error generating Win32 resource: Error reading icon 'd:\Documents\B4X\BmT_Consumer\B4J\Objects\temp\icon.ico' -- The data is invalid.
 
Upvote 0

Kevin Hartin

Active Member
Licensed User
OK, it is solved. I used the https://www.lunapic.com/editor/ suggested by aeric and this time I uploaded a GIF rather than a PNG, resized to 72x72 and saved as a Windows ICO file.

I tried again using the PNG source and it failed, so it looks like the GIF source is the way to go. Strange because both came from the same photoshop file...

Thanks,
Kev
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
OK, it is solved. I used the https://www.lunapic.com/editor/ suggested by aeric and this time I uploaded a GIF rather than a PNG, resized to 72x72 and saved as a Windows ICO file.

I tried again using the PNG source and it failed, so it looks like the GIF source is the way to go. Strange because both came from the same photoshop file...

Thanks,
Kev
Ya strange. I never have problem with ICO converted from PNG image.
 
Upvote 0
Top