Author Topic: Item entry shows black images no matter what  (Read 2404 times)

tripredacus

Item entry shows black images no matter what
« on: October 16, 2017, 11:58:53 am »
User mcrstr has been trying to add images to this entry:
https://vgcollect.com/item/103573

They show up as black images and they are rejected.

Here are the images attempted to be used:
https://imgur.com/a/RFlNc
https://imgur.com/a/gAitK

I tried to put those images and they are black.
I then opened them and re-exported them as JPG 99% and put them and they are black.
Then I tried (as a test) to put an image I just used to create another entry, and it is black also.

It seems there is something wrong with this item.

Posting this thread for user.

User will try to make new entry for this item. Want to leave the existing item in the db, put a note into "alt name" field to not merge it. I will change the alt-name field back once resolved.
« Last Edit: October 16, 2017, 12:03:45 pm by tripredacus »

mcrstr

  • Guest
Re: Item entry shows black images no matter what
« Reply #1 on: October 16, 2017, 12:03:07 pm »
Hi!

Maybe pictures from gamefaq will work? I put it to this item.

tripredacus

Re: Item entry shows black images no matter what
« Reply #2 on: October 16, 2017, 12:12:32 pm »
The image used doesn't seem to matter. I tried to put the front art image I used to make the Quackshot entry and it showed as a black image also. Someone with code/db access will have to take a look at it.

Re: Item entry shows black images no matter what
« Reply #3 on: October 16, 2017, 12:58:15 pm »
I tried a different thing and submitted.


desocietas

Re: Item entry shows black images no matter what
« Reply #4 on: October 16, 2017, 01:26:17 pm »
I tried a different thing and submitted.



No black image for me. I'll leave the update pending in case trip wants to take a look at it himself.
Currently playing:
FFXIV (PC), The Witcher (PC), Monster Hunter World: Iceborne (PS4)
twitch.tv/desocietas

tripredacus

Re: Item entry shows black images no matter what
« Reply #5 on: October 16, 2017, 03:28:30 pm »
I approved the edit. What did you do different? I also tried the images from Gamefaqs.

Agozer

Re: Item entry shows black images no matter what
« Reply #6 on: October 16, 2017, 04:37:18 pm »
For what it's worth, I've stumbled upon this black image issue when I edited an entry and submitted PNG images. JPEG edits have never had any such issues.

desocietas

Re: Item entry shows black images no matter what
« Reply #7 on: October 16, 2017, 04:39:52 pm »
For what it's worth, I've stumbled upon this black image issue when I edited an entry and submitted PNG images. JPEG edits have never had any such issues.

Yeah usually PNG or large file images will cause issues but Trip already saved the item as a jpeg... My last resort would've been to open the image on my computer and make a screenshot, then try to upload the screenshot, lol.
Currently playing:
FFXIV (PC), The Witcher (PC), Monster Hunter World: Iceborne (PS4)
twitch.tv/desocietas

Re: Item entry shows black images no matter what
« Reply #8 on: October 16, 2017, 09:32:08 pm »
I posted about this in the admin section a while back. I figured how what causes it.

"It comes down to the wrong file extension applied to an image. Like switching .PNG to .JPG.

Let's pretend I scan an image and the device saves it to my computer as SCAN001.jpg. Next I go into Windows Explorer and rename the image to have a different extension. So something like SCAN001.png. If I were to upload that image to VGCollect it would come out black. Many programs like web browsers or even OS thumbnails ignore the written extension.

I'm uncertain to how Matt wrote the site by my guess is that when the algorithm goes to encode an image it first determines the format of the uploaded image by it's extension. At this point it breaks because it starts reading the image data incorrectly. PNG and JPG for example use very different methods of compression. Instead of determining the format by the given extension it needs to actually read a bit of the file first to figure out what it is before proceeding."
« Last Edit: October 16, 2017, 09:33:42 pm by badATchaos »

desocietas

Re: Item entry shows black images no matter what
« Reply #9 on: October 17, 2017, 02:21:02 am »
I posted about this in the admin section a while back. I figured how what causes it.

"It comes down to the wrong file extension applied to an image. Like switching .PNG to .JPG.

Let's pretend I scan an image and the device saves it to my computer as SCAN001.jpg. Next I go into Windows Explorer and rename the image to have a different extension. So something like SCAN001.png. If I were to upload that image to VGCollect it would come out black. Many programs like web browsers or even OS thumbnails ignore the written extension.

I'm uncertain to how Matt wrote the site by my guess is that when the algorithm goes to encode an image it first determines the format of the uploaded image by it's extension. At this point it breaks because it starts reading the image data incorrectly. PNG and JPG for example use very different methods of compression. Instead of determining the format by the given extension it needs to actually read a bit of the file first to figure out what it is before proceeding."

Ahhhh, interesting. The ol' trick we kids used to do before we understood file formats. Just change the extension and hope it works... :P
Currently playing:
FFXIV (PC), The Witcher (PC), Monster Hunter World: Iceborne (PS4)
twitch.tv/desocietas

Re: Item entry shows black images no matter what
« Reply #10 on: October 17, 2017, 08:26:28 am »
I posted about this in the admin section a while back. I figured how what causes it.

"It comes down to the wrong file extension applied to an image. Like switching .PNG to .JPG.

Let's pretend I scan an image and the device saves it to my computer as SCAN001.jpg. Next I go into Windows Explorer and rename the image to have a different extension. So something like SCAN001.png. If I were to upload that image to VGCollect it would come out black. Many programs like web browsers or even OS thumbnails ignore the written extension.

I'm uncertain to how Matt wrote the site by my guess is that when the algorithm goes to encode an image it first determines the format of the uploaded image by it's extension. At this point it breaks because it starts reading the image data incorrectly. PNG and JPG for example use very different methods of compression. Instead of determining the format by the given extension it needs to actually read a bit of the file first to figure out what it is before proceeding."
If Matt is using the standard SMF algorithm for uploading images, this is why.  There is a known bug in the SMF "framework" that causes this issue.  I used to run an SMF forum mainly for hosting and sharing images, like 1-3 million hits a month, so we had this issue frequently.

We had to have folks take their images, open them up in some photo editor, and then use the "Export for Web" option.  It was the only way to get rid of the issue without risking quality loss.


Re: Item entry shows black images no matter what
« Reply #11 on: October 17, 2017, 08:29:59 am »
Tried another, different thing for the back art and submitted.


tripredacus

Re: Item entry shows black images no matter what
« Reply #12 on: October 17, 2017, 10:21:16 am »
Back art approved.

I understand about the renaming of the file extension thing, but that should have been a non-issue since I had exported the image to a JPG with 99% quality. We may never know what the real issue was.

Re: Item entry shows black images no matter what
« Reply #13 on: October 17, 2017, 11:50:06 am »
Back art approved.

I understand about the renaming of the file extension thing, but that should have been a non-issue since I had exported the image to a JPG with 99% quality. We may never know what the real issue was.
*shrug*  Back when I was running an image board based on SMF, exporting as [image type] wasn't enough, you had to export for web.

So clicking "Save As..." may not be sufficient.  "Export As..." should in theory actually convert the image to the desired type. 


tripredacus

Re: Item entry shows black images no matter what
« Reply #14 on: October 17, 2017, 12:04:57 pm »
I know, in this program (Fireworks) save-as wouldn't ever help as it only "Saves" as Fireworks Vector PNG anyways. I have a custom image profile set up for creating JPG images for use on VGC that is used for Exports.