Error: Unsupported Image Type Issue

See original GitHub issue

First off, the HashLips Art Engine is awesome! I am having this issue with the latest Hashlips Art Engine which happens when I start outputting my NTFs. Sometimes I get to 1000, sometimes 200, sometimes only 30 NTFs generated before I get the error below. I’ve replaced the images, changed drives–but I know the error will pop up and interrupt the output even though the TogrowEditionSize is set to 10000. Any help would be greatly appreciated! Thx 😃

C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:91 SetSource.call(img, src); ^ Error: Unsupported image type at setSource (C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:91:13) at Image.set (C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:62:9) at C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\index.js:34:15 at new Promise (<anonymous>) at loadImage (C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\index.js:23:10) at C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:181:25 at new Promise (<anonymous>) at loadLayerImg (C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:180:10) at C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:361:31 at Array.forEach (<anonymous>) PS C:\Users\user profile\Downloads\hashlips_art_engine-main\hashlips_art_engine-main>

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
LKYSE7ENcommented, Nov 8, 2021

Hi kristiangabriel,

Can you check your file names for all your layers and ensure that none of them include any “-”, for some reason the hyphen causes an error.

From memory the error looked similar to what you’re showing me and due to the rarity weights it can throw the error at different intervals.

I hope this helps!

Cheers.

0reactions
kristiangabrielcommented, Nov 11, 2021

I got the same exact problem, but all my png are just fine. No spaces or any unlliget symbols. There’s possibly any other solution? Ive tried EVERYTHING! 3 days of that issues. Im lost!

That sounds like what I went through! I even tried different computers MAC/PC and all kinds of things. Aside from the naming issue with dashes, etc–the other thing I found was a corruption in a few of the graphics files that were not visually or functionally apparent at all. Depend on how you are creating and outputting your graphic content makes a difference. I use primarily Adobe Illustrator and sometimes Photoshop to create most of my content. I found out that creating the graphics in the 2021 versions and then outputting them from the 2022 versions of Adobe caused slight corruptions in some of the files and this also caused the nft outputs to stop and cause errors. Here is what I did to fix my issues:

  • Check that all my names have hash symbols unless the delimiter is changed
  • Check that there are no dashes or any special characters in the naming of graphics or the layer file names (this fixed my first issue)
  • Then I eliminated my layer folders (background, body, etc) one at a time and re-output my NFTs to see if I received the same problem.**

Other than the naming fixes, I was able to bypass issues and located problems across a few layer folders.

Solution: I re-output a small batch of graphics in the new Adobe 2022 apps and they seem to be fine so I re-generated my new layers. And this seemed to do the trick.**

As a side note, in Illustrator, I flattened, expanded and outlined EVERYTHING before output. So if you are working in Illustrator you’ll probably want to duplicate your project first. There are known corruptions with some PNG outputs from Illustrator and Photoshop. In Photoshop I duplicate my files and merge layers with transparencies to fix this. While this doesn’t always happen, I’ve learned to do this for my NFT artwork to avoid as much corruptions as possible. I know there are other things that can contribute to error issues as well but this is my experience so far.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Unsupported image type · Issue #1709 - GitHub
Issue. Error: Unsupported image type at setSource (C:\Users\Usr\Desktop\Xenova-rewrite-master\node_modules\canvas\lib\image.js:91:13)
Read more >
Error: Unsupported image type - Stack Overflow
Dependency : canvas > version: 2.6.1 node > version: 12.12.62. I am trying to do bellow : const { createCanvas, loadImage } ...
Read more >
How to Open Unsupported Photos Formats on Android - Stellar
The unsupported file type error appears, when your mobile phone doesn't support the image format. So first check the file format of the...
Read more >
Fix 'Unsupported Format Error' When Open Photos On Android
Part 3: How to Fix 'Unsupported Format Error' When Open Photos On Android · Method 1: Try reducing the image size · Method...
Read more >
How to Fix the “Unsupported Image Type” Error in Google ...
Google slides have made it easy to create and present your work. · Google's services are usually quite reliable, so if you're experiencing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found