VGCollect Forum

VGCollect Site Stuff => Site Feedback => Topic started by: tripredacus on October 16, 2017, 11:58:53 am

Title: Item entry shows black images no matter what
Post by: tripredacus 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.
Title: Re: Item entry shows black images no matter what
Post by: mcrstr on October 16, 2017, 12:03:07 pm
Hi!

Maybe pictures from gamefaq will work? I put it to this item.
Title: Re: Item entry shows black images no matter what
Post by: tripredacus 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.
Title: Re: Item entry shows black images no matter what
Post by: ignition365 on October 16, 2017, 12:58:15 pm
I tried a different thing and submitted.
Title: Re: Item entry shows black images no matter what
Post by: desocietas on October 16, 2017, 01:26:17 pm
I tried a different thing and submitted.

(https://i.imgur.com/PRe0kzo.png)

No black image for me. I'll leave the update pending in case trip wants to take a look at it himself.
Title: Re: Item entry shows black images no matter what
Post by: tripredacus on October 16, 2017, 03:28:30 pm
I approved the edit. What did you do different? I also tried the images from Gamefaqs.
Title: Re: Item entry shows black images no matter what
Post by: Agozer 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.
Title: Re: Item entry shows black images no matter what
Post by: desocietas 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.
Title: Re: Item entry shows black images no matter what
Post by: badATchaos on October 16, 2017, 09:32:08 pm
I posted about this in the admin section (https://vgcollect.com/forum/index.php/topic,6840.0.html) 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."
Title: Re: Item entry shows black images no matter what
Post by: desocietas on October 17, 2017, 02:21:02 am
I posted about this in the admin section (https://vgcollect.com/forum/index.php/topic,6840.0.html) 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
Title: Re: Item entry shows black images no matter what
Post by: ignition365 on October 17, 2017, 08:26:28 am
I posted about this in the admin section (https://vgcollect.com/forum/index.php/topic,6840.0.html) 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.
Title: Re: Item entry shows black images no matter what
Post by: ignition365 on October 17, 2017, 08:29:59 am
Tried another, different thing for the back art and submitted.
Title: Re: Item entry shows black images no matter what
Post by: tripredacus 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.
Title: Re: Item entry shows black images no matter what
Post by: ignition365 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. 
Title: Re: Item entry shows black images no matter what
Post by: tripredacus 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.
Title: Re: Item entry shows black images no matter what
Post by: ignition365 on October 17, 2017, 12:08:26 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.
Welll.... fireworks is obsolete.

I used GIMP, because it's what I have on my work computer.
Title: Re: Item entry shows black images no matter what
Post by: tripredacus on October 18, 2017, 10:00:51 am
Big talk on a site dedicated to inventory people's collection of obsolete software.  :o
Title: Re: Item entry shows black images no matter what
Post by: ignition365 on October 18, 2017, 10:19:17 am
Big talk on a site dedicated to inventory people's collection of obsolete software.  :o
Hahahaha.  Nice.
Title: Re: Item entry shows black images no matter what
Post by: tripredacus on October 18, 2017, 11:21:59 am
Besides, it isn't obsolete in the least bit. It is just a sad testament to the fact that we are still just using old image formats and still haven't come up with anything different. Some have been tried, such as what started (I believe) with SVG, which is the data format. And we still do not have a good replacement for animated gifs, just websites like Imgur pretending that movie files are gifs. So Fireworks is still relevant in today's world, if only because we haven't made any new image formats since it was last released, which ironically is CS6 and is a current Adobe product. As a 17+ year Fireworks user, I can tell you that Adobe barely made any changes to the product since they acquired it with Macromedia.
Title: Re: Item entry shows black images no matter what
Post by: ignition365 on October 18, 2017, 11:32:18 am
Besides, it isn't obsolete in the least bit. It is just a sad testament to the fact that we are still just using old image formats and still haven't come up with anything different. Some have been tried, such as what started (I believe) with SVG, which is the data format. And we still do not have a good replacement for animated gifs, just websites like Imgur pretending that movie files are gifs. So Fireworks is still relevant in today's world, if only because we haven't made any new image formats since it was last released, which ironically is CS6 and is a current Adobe product. As a 17+ year Fireworks user, I can tell you that Adobe barely made any changes to the product since they acquired it with Macromedia.
I don't think Adobe has made many changes to anything since they acquired Macromedia.