GWT not possible to download images into pixmap
See original GitHub issueIssue details
When compiling WEB with gradlew.bat html:dist
getting an exception:
The constructor Pixmap(byte[], int, int) is undefined
How can I load an image from a URL on WEB/GWT/HTML5? Also, there is a warning there, is it safe to ignore?
Reproduction steps/code
OS: Windows 10
IDE: Intellij
Executing command: gradlew.bat html:dist
Version of LibGDX and/or relevant dependencies
Please provide the version(s) affected.
Stacktrace
Compiling error
> Task :html:compileGwt
Apr 27, 2020 7:54:12 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Compiling module com.gazman.stories.GdxDefinition
Tracing compile failure path for type 'my.file.java'
[ERROR] Errors in 'file:/C:/my.file.java'
[ERROR] Line 62: The constructor Pixmap(byte[], int, int) is undefined
[ERROR] Aborting compile due to errors in some input files
Java source code:
byte[] bytes = ...
Pixmap pixmap = new Pixmap(bytes, 0, bytes.length);
Please select the affected platforms
- Android
- iOS (robovm)
- iOS (MOE)
- [ *] HTML/GWT
- [ *] Windows
- Linux
- MacOS
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Where to place images in gwt? - java - Stack Overflow
I'm trying to load a simple image in GWT. But it is never found. import com.google.gwt.user.client.ui.Image; public ...
Read more >[GWT] Documentation - Image Bundles
GWT can package many image files into a single large file to be downloaded from the server and managed as a Java object....
Read more >read images from filesystem - SmartClient Forums
Good afternoon. I have a big doubt with the APIs of SmartGwt. It exists some way to get a lot of image files,...
Read more >Generate URL to image stored on server - Google Groups
1. User uploads image. This is stored and the URL returned. An image widget is constructed around this URL. This part is functional...
Read more >Google Web Toolkit - ImageBundle - NTNU
An image bundle is a composition of multiple images into a single large image, ... ImageBundle { /** * Notice that the gwt.resource...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@IlyaGazman For info on pull requests, see this (or any other) general info tutorial and this libGDX specific page for contributors. You don’t have to get it right the first time - that is what code review is for, so don’t worry about it too much.
@shatterblast: By warning, I meant this line:
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
, which has nothing to do with any networking and everything to do with windows registry.The standard way includes using an InputStream with some REST protocols. The Google HTTP Client can help some. You might check StackOverflow for some references.