Posted by Aesir on Sat, 11 Apr 2009 15:13:24
Firefox, right click Save Image As... when right-clicking the image displayed on the BLP2PNG page forces a file name extension of, of all things, .com. The default suggested name was actually www.wowprogramming.com with a file type of "PNG". Yowzaa.
So yes, my OS wants to execute the file downloaded from your site. But that's not too horrible because it's just a PNG. Except it's not. Right click Save Image As... is saving the web page itself. With a default name of www.wowprogramming.com. And yes, try to rename it - it'll still have a .com extension. And here is the file contents, as opened using Notepad2 (a plain text editor). I don't think it's either a COM or PNG file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Home Page - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons</title>
<link type="text/css" rel="stylesheet" href="/blueprint/reset.css" media="screen, projection" />
<link type="text/css" rel="stylesheet" href="/blueprint/typography.css" media="screen, projection" />
<!--[if IE]><link type="text/css" rel="stylesheet" href="/blueprint/ie.css" media="screen, projection" /><![endif]-->
<link type="text/css" rel="stylesheet" href="/blueprint/forms.css" media="screen, projection" />
<link type="text/css" rel="stylesheet" href="/layout.css" />
You are logged in as Aesir (<a href='/Home_Page&logout=1' class='local'>Logout</a>)
<li><a class="inactive" href="/store">Store</a></li><li><a class="inactive" href="/about">About</a></li><li><a class="inactive" href="/utils">Utils</a></li><li><a class="inactive" href="/docs">Reference</a></li><li><a class="inactive" href="/forums">Forums</a></li><li><a class="active" href="/">Home</a></li>
<li class="last"><a href='/Home_Page' class='local'>Home Page</a></li>
<li><a href='/Home_Page.rss' class='local'><img src="/images/rss_icon_small.png" /></a></li>
<h2>World of Warcraft Programming</h2>
<p>Welcome to the companion site for World of Warcraft Programming: A Guide and Reference for Creating WoW Addons! See the tabs above or the links below for the latest information affecting the book and the World of Warcraft API.</p>
<p><a href="/store">Store</a> - Buy this and other recommended books related to WoW addon programming.</p>
<p><a href="/docs">Reference</a> - An expanded version of the API reference in the book that includes all changes to the API since the book's release.</p>
<p><a href="/chapters">Chapters</a> - Download example addons and source code, check for corrections to the book, and browse the table of contents for each chapter.</p>
<p><a href="/forums">Forums</a> - Chat with other WoW Programmers! Report website problems, suggest updates, etc.</p>
<p><a href="/utils">Utilities</a> - Download useful tools including Lua binaries, development addons, and more. Experiment in Lua with our online, interactive interpreter and other web-based tools.</p>
<p><a href="/misc/snippets">Code Snippets</a> - Post a snippet of code here that you find useful, or browse other people's snippets.</p>
<li><a href="/about/terms_of_service">Terms of Service</a></li>
<p>World of Warcraft™ and Blizzard Entertainment™ are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. The <em>API Reference</em> section of this website is copyright John Wiley & Sons. Other copyrights on this page are owned by their respective owners. All other content © 2008 <a href="/about">wowprogramming.com</a>.</p>
Test this page to see if it works with Windows+Firefox. Don't provide alternate link text on that page. Don't display the image. Wouldn't we rather have a download link or something? Right click save as functionality is awful across different browsers/operating systems. In the interim, is there any utility on the planet that will let me
a) view a BLP, and
b) convert it to TGA, PNG, or any of another hundred better file formats?
XnView, while mentioned in every sticky topic on the subject over at the official forums, wowi, curse, wowui, etc., can't actually open the majority of BLPs. It can open 1 or 2, but it's quite by accident and the XnView author knows this since about 2006. Dead links on those same stickies for the few utilities that existed back in 2005 aren't quite as helpful as xnview in this respect. No one smart has gotten together a The GIMP or Photoshop plug-in yet, and the handful of people that can evidently work with BLPs are, for reasons unknown, conspiring together and not telling anyone how they do it.
This site was my last hope. *cries*
Posted by Aesir on Sat, 11 Apr 2009 15:13:24
Removed duplicate post. Also, serves as a test case for the new Edit functionality of the forum. How useful!
Posted by jnwhiteh on Tue, 14 Apr 2009 05:30:42
I'm not really sure that i understand the issue. I have tested this converter on the platform you mention and it works just fine. The image that is displayed in a image/png and will be displayed in the browser correctly, and saving the IMAGE to your disk should work just fine. I agree the user experience could be enhanced, but this appears to be an issue with the way you're trying to save the file from what I can tell.
Also, there is no need to double-post, I'm removing the duplicate.
Posted by Aesir on Tue, 14 Apr 2009 08:17:07
I'll try to make a video to demo what I'm seeing. In the meantime, these are the steps I'm taking.
- Navigate to wowprogramming.com, click link for Utilities, then click blp2png. I'm at http://wowprogramming.com/utils/blp2png
- Click Browse, and select (in my case) the file HealthBar.blp found in the subfolder of an addon I have installed. I have admin rights under this account to the AddOns folder structure and files. When selecting "Open" in the Browse dialog, the path returned to the edit field is valid. In my case, E:\Documents and Settings\[user]\My Documents\My Downloads\SpartanUI_v2.5.2\SpartanUI\Media\HealthBar.blp.
- Click Convert. An embedded image is rendered on a page with a URL of http://wowprogramming.com/.
- Right-click the image for the context menu. The options are the expected ones:
- Copy Image,Copy Image Location, Save Image As.., Send Image, Set as Desktop Background, Properties.
- Select Save Image As...
The default file name is wowprogramming.com, with an file type of PNG (according to the Save Image As dialog). The default flie extension of .com is a poor choice for Windows systems, but that's a separate issue I don't want to address here. Just type in a more appropriate name, such as HealthBar - leaving the file type as PNG and we expect that it will add the file extension .png. But it doesn't. It saves a file named HealthBar.com. And it's not even a PNG file - if you open it in a text editor, you find that it's page source code that I'd quoted in my first post.
If you try to save the file as HealthBar.png, and explicitly type in HealthBar.png, with a file type of PNG in the Save Image As dialog (as a way to force the file extension and correct file format) it saves a file named HealthBar.png, but it's still just site page source, not a PNG image.
I've saved images off of web pages before. I don't understand why I'm not getting the image, but rather just the page source. System browser is FF 3.08 under XP SP3. I have cookies and scripts enabled for wowprogramming.com.
Separately, the double-post mentioned was of course inadvertent. I wasn't permitted to edit the 2nd post when I realized that the 2nd create post tab I had open got sent in. I didn't spend any time troubleshooting that, and figured an admin would handle it appropriately. I was right!