Page 1 of 2

Corrupt Server Images

PostPosted: 03 Jul 2011, 15:18
by friarsol
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.

Re: Corrupt Server Images

PostPosted: 03 Jul 2011, 15:25
by Rob Cashwalker
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.

Re: Corrupt Server Images

PostPosted: 03 Jul 2011, 15:26
by Sloth
I can add Groundswell to the list. I even deleted the jpg and downloaded again without improvement.

Re: Corrupt Server Images

PostPosted: 03 Jul 2011, 19:15
by Rob Cashwalker
I'm re-uploading from my original folders.

Re: Corrupt Server Images

PostPosted: 04 Jul 2011, 02:31
by friarsol
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.

Re: Corrupt Server Images

PostPosted: 04 Jul 2011, 16:26
by Rob Cashwalker
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.

Re: Corrupt Server Images

PostPosted: 04 Jul 2011, 17:26
by Sloth
I redownloaded some of the corrupt pictures and they are all ok. Thanks Rob.

Re: Corrupt Server Images

PostPosted: 04 Jul 2011, 20:17
by timmermac
Hasran Ogress from Arabian Nights doesn't seem to be on the server.

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 13:45
by Rob Cashwalker
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.

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 19:36
by Jaedayr
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?

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 20:08
by friarsol
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.

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 20:27
by Jaedayr
Ahh, thank you for the info! I will wait patiently then.

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 20:56
by Rob Cashwalker
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.

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 21:30
by Chris H.
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.

Re: Corrupt Server Images

PostPosted: 05 Jul 2011, 22:54
by timmermac
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.