It is currently 11 Sep 2025, 23:15
   
Text Size

Corrupt Server Images

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Corrupt Server Images

Postby friarsol » 03 Jul 2011, 15:18

Rob, It looks like when downloading certain images the file that's saved is not an actual Image. I don't have a complete list (for obvious reasons) but it looks like at least these cards (from Time Spiral) have issues:

badImages | Open
Blazing Blade Askari
Deep-Sea Kraken
Demonic Collusion
Flickering Spirit
Flowstone Channeler
Ghitu Firebreathing
Might of Old Krosa
Norin the Wary
Pendelhaven Elder
Phyrexian Totem
Skittering Monstrosity
Strength in Numbers
Tolarian Sentinel
Tresspasser il-Vec
Walk the Aeons
Wheel of Fate
Wurmcalling
Zealot il-Vec


The following issue and nonsensical error message appears when trying to display one of these cards in the deck editor.
http://code.google.com/p/cardforge/issues/detail?id=134

I'm not sure if there's a quick way to check on all the Images. I just put my pictures on Preview and listed the ones that didn't preview properly.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Corrupt Server Images

Postby Rob Cashwalker » 03 Jul 2011, 15:25

Thanks...

I had noticed some issues with some pics from NPH. Something likely happened during my transfer to the new host. Either the pictures broke on the way down from the original host or on the way up to the new one.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Corrupt Server Images

Postby Sloth » 03 Jul 2011, 15:26

I can add Groundswell to the list. I even deleted the jpg and downloaded again without improvement.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Corrupt Server Images

Postby Rob Cashwalker » 03 Jul 2011, 19:15

I'm re-uploading from my original folders.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Corrupt Server Images

Postby friarsol » 04 Jul 2011, 02:31

I found a way to determine if images are corrupt. It seems to me that a lot of the files I've downloaded recently aren't correct, so reuploading should probably fix that.

If you are interested in the python script you need to download the Python Imaging Library (http://www.pythonware.com/products/pil/) and then run this:

Code: Select all
from PIL import Image
import os,fnmatch

err = open('imageVerify.log','w')

for root, dirnames, filenames in os.walk("."):
   for fileName in fnmatch.filter(filenames, '*.jpg'):
      if fileName.startswith('.'):
         continue
      
      path = os.path.join(root, fileName)
      try:
         im = Image.open(path)
         im.verify()
      except Exception:
         print path
         err.write(path + '\n')
from your /res/pics folder.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Corrupt Server Images

Postby Rob Cashwalker » 04 Jul 2011, 16:26

Very Interesting Sol, I had worked on a PHP script to just display all the images in the folder in a table... it almost worked, except for the fact the filenames didn't include .jpg, so the browser didn't display them as images...

I did the bulk of re-uploading last night, and I just finished re-uploading the MBS and NPH images. MBS images were the preliminary images with full borders anyway, so I pulled the HQ archive again, and down-sized them. I didn't have the original NPH images on my laptop at all, so I did the same to them.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Corrupt Server Images

Postby Sloth » 04 Jul 2011, 17:26

I redownloaded some of the corrupt pictures and they are all ok. Thanks Rob.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Corrupt Server Images

Postby timmermac » 04 Jul 2011, 20:17

Hasran Ogress from Arabian Nights doesn't seem to be on the server.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Corrupt Server Images

Postby Rob Cashwalker » 05 Jul 2011, 13:45

I saw that the HQ archive had 2 images for Hasran Ogress. magiccards.info lists 2 images, but they only differ in the color constrasts and the mana symbol in the rules text.

2 Options, - change the SetInfo in the card.txt file, or choose 1 of the images and drop the number from the filename.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Corrupt Server Images

Postby Jaedayr » 05 Jul 2011, 19:36

I just downloaded LQ sets and every COM image said it was not on the server. They are also missing in-game. Is this related to the activities of this thread?
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Corrupt Server Images

Postby friarsol » 05 Jul 2011, 20:08

Jaedayr wrote:I just downloaded LQ sets and every COM image said it was not on the server. They are also missing in-game. Is this related to the activities of this thread?
Nope. Commander cards don't have HQ pics yet, and aren't on the servers yet. When they are ready and Rob has some time they will go up soon after.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Corrupt Server Images

Postby Jaedayr » 05 Jul 2011, 20:27

Ahh, thank you for the info! I will wait patiently then.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Corrupt Server Images

Postby Rob Cashwalker » 05 Jul 2011, 20:56

What Sol said, and as I mentioned in another thread, the set code COM may not play well with windows as a folder name, and we will likely use CMD instead.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Corrupt Server Images

Postby Chris H. » 05 Jul 2011, 21:30

Rob Cashwalker wrote:What Sol said, and as I mentioned in another thread, the set code COM may not play well with windows as a folder name, and we will likely use CMD instead.
`
I used "COM" in the setdata.txt file. I chose "COM" since this was the sequence used in the setInfoScript.py file. It would be easy to change this to "CMD".

The cards would need changing, "SetInfo:COM|" to "SetInfo:CMD|". It looks like PerSetTracking.py also also has an occurrence of "COM" that would need to be changed.

I think that I can take care of this, provided that no one comes up with a reason not to.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Corrupt Server Images

Postby timmermac » 05 Jul 2011, 22:54

I don't know about Vista or Windows 7, but COM as a folder name doesn't seem to be a problem for XP. The folder is sitting in /res/pics waiting for Commander pics to be available for download.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 35 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 35 users online :: 0 registered, 0 hidden and 35 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 35 guests

Login Form