Corrupt Server Images
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			19 posts
			 • Page 1 of 2 • 1, 2
		
	
Corrupt Server Images
 by friarsol » 03 Jul 2011, 15:18
by 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:
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.
			
		- 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
 by Rob Cashwalker » 03 Jul 2011, 15:25
by 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.
			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.
		- 
				 
 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
 by Sloth » 03 Jul 2011, 15:26
by Sloth » 03 Jul 2011, 15:26 
I can add Groundswell to the list. I even deleted the jpg and downloaded again without improvement.
			
		- 
				 
 Sloth
- Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Corrupt Server Images
 by Rob Cashwalker » 03 Jul 2011, 19:15
by Rob Cashwalker » 03 Jul 2011, 19:15 
I'm re-uploading from my original folders.
			The Force will be with you, Always.
		- 
				 
 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
 by friarsol » 04 Jul 2011, 02:31
by 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:
			
		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')
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Corrupt Server Images
 by Rob Cashwalker » 04 Jul 2011, 16:26
by 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.
			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.
		- 
				 
 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
 by Sloth » 04 Jul 2011, 17:26
by Sloth » 04 Jul 2011, 17:26 
I redownloaded some of the corrupt pictures and they are all ok. Thanks Rob.
			
		- 
				 
 Sloth
- Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Corrupt Server Images
 by timmermac » 04 Jul 2011, 20:17
by 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
		Re: Corrupt Server Images
 by Rob Cashwalker » 05 Jul 2011, 13:45
by 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.
			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.
		- 
				 
 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
 by Jaedayr » 05 Jul 2011, 19:36
by 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?
			
		Re: Corrupt Server Images
 by friarsol » 05 Jul 2011, 20:08
by friarsol » 05 Jul 2011, 20:08 
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.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?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Corrupt Server Images
 by Jaedayr » 05 Jul 2011, 20:27
by Jaedayr » 05 Jul 2011, 20:27 
Ahh, thank you for the info! I will wait patiently then.
			
		Re: Corrupt Server Images
 by Rob Cashwalker » 05 Jul 2011, 20:56
by 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.
		- 
				 
 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
 by Chris H. » 05 Jul 2011, 21:30
by 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.
- 
				 
 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
 by timmermac » 05 Jul 2011, 22:54
by 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
		
			19 posts
			 • Page 1 of 2 • 1, 2
		
	
Who is online
Users browsing this forum: Google [Bot] and 45 guests
 
 