Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > The png files of WDK sample can't be opened

Reply
Thread Tools Display Modes

The png files of WDK sample can't be opened

 
 
Libra Wu
Guest
Posts: n/a

 
      11-23-2009
Dear Sir,
I check the Microsoft WDK 7600 sample code.
I find the PNG files of WDK swtuner folder, but I can’t watch it on Windows
OS.(path is :
\WINDDK\7600.16385.0\src\swtuner\MergedDevice\BDAD MBTHTuner\Images)
I want to use the Microsoft Paint or Adobe Photoshop to edit it, but the
picture cannot be opened.
I don’t know how to modify it.
Could you give me any suggestion?
Thanks a lot,

 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a

 
      11-23-2009
Libra Wu <Libra > wrote:
>
>I check the Microsoft WDK 7600 sample code.
>I find the PNG files of WDK swtuner folder, but I can’t watch it on Windows
>OS.(path is :
>\WINDDK\7600.16385.0\src\swtuner\MergedDevice\BDA DMBTHTuner\Images)
>I want to use the Microsoft Paint or Adobe Photoshop to edit it, but the
>picture cannot be opened.
>I don’t know how to modify it.
>Could you give me any suggestion?


The developers must have been on drugs when they created those files with
..png extensions. Those files contain PNG images that have been Base64
encoded, then written out in Unicode (UTF-16).

You will have to use some kind of program to convert them to image files. I
was able to use a Python script to read them in and decode them:

import base64
import codecs
s = base64.b64decode( codecs.open('bg2.png','r','utf-16').read() )
open( 'bg2x.png', 'wb' ).write( s )
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Libra Wu
Guest
Posts: n/a

 
      11-23-2009
Dear Tim,

Thanks a lot,
Best regards,
Libra

"Tim Roberts" wrote:

> Libra Wu <Libra > wrote:
> >
> >I check the Microsoft WDK 7600 sample code.
> >I find the PNG files of WDK swtuner folder, but I can’t watch it on Windows
> >OS.(path is :
> >\WINDDK\7600.16385.0\src\swtuner\MergedDevice\BDA DMBTHTuner\Images)
> >I want to use the Microsoft Paint or Adobe Photoshop to edit it, but the
> >picture cannot be opened.
> >I don’t know how to modify it.
> >Could you give me any suggestion?

>
> The developers must have been on drugs when they created those files with
> ..png extensions. Those files contain PNG images that have been Base64
> encoded, then written out in Unicode (UTF-16).
>
> You will have to use some kind of program to convert them to image files. I
> was able to use a Python script to read them in and decode them:
>
> import base64
> import codecs
> s = base64.b64decode( codecs.open('bg2.png','r','utf-16').read() )
> open( 'bg2x.png', 'wb' ).write( s )
> --
> Tim Roberts,
> Providenza & Boekelheide, Inc.
> .
>

 
Reply With Quote
 
Friedo
Guest
Posts: n/a

 
      12-15-2009
This is because a PBDA driver must return images as base64 encoded PNGs (via
the GPNV service).

"Libra Wu" wrote:

> Dear Tim,
>
> Thanks a lot,
> Best regards,
> Libra
>
> "Tim Roberts" wrote:
>
> > Libra Wu <Libra > wrote:
> > >
> > >I check the Microsoft WDK 7600 sample code.
> > >I find the PNG files of WDK swtuner folder, but I can’t watch it on Windows
> > >OS.(path is :
> > >\WINDDK\7600.16385.0\src\swtuner\MergedDevice\BDA DMBTHTuner\Images)
> > >I want to use the Microsoft Paint or Adobe Photoshop to edit it, but the
> > >picture cannot be opened.
> > >I don’t know how to modify it.
> > >Could you give me any suggestion?

> >
> > The developers must have been on drugs when they created those files with
> > ..png extensions. Those files contain PNG images that have been Base64
> > encoded, then written out in Unicode (UTF-16).
> >
> > You will have to use some kind of program to convert them to image files. I
> > was able to use a Python script to read them in and decode them:
> >
> > import base64
> > import codecs
> > s = base64.b64decode( codecs.open('bg2.png','r','utf-16').read() )
> > open( 'bg2x.png', 'wb' ).write( s )
> > --
> > Tim Roberts,
> > Providenza & Boekelheide, Inc.
> > .
> >

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      12-20-2009
alberto <> wrote:
>
>On my Windows 7 host, Microsoft Paint, Internet Explorer 8 and Windows
>Photo Viewer can open .png files ok.


Of course they can. That's not the point. The point is that these files
in the WDK have a .png extension, but they aren't PNG files. They are PNG
files that have been base64-encoded. None of those tools can open them.

They should have been called xxx.png.b64 to eliminate confusion.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening multiple Excel files from IE browser does not open in new instance of Excel - BUG? Troy Munford Internet Explorer 2 11-11-2009 05:13 PM
Offline files fail to synchronize Bob Windows Vista File Management 19 04-30-2009 05:45 AM
Files Remain Hidden Even though I selected show Hidden & Protected LabTechnician Windows Vista File Management 11 03-02-2008 10:08 AM
Offline Files Mike Benton Windows Vista File Management 1 05-04-2007 08:58 PM
Offline Files (Plain Text This Time) Mike Benton Windows Vista File Management 0 05-03-2007 02:37 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59