AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Zip Thumbnails (Updated:version 4.6.2, 18.4.2011)
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
T800



Joined: 15 Oct 2006
Posts: 88
Location: Croatia

PostPosted: Tue Mar 02, 2010 4:59 pm    Post subject: Reply with quote

Details pane is at the bottom, preview pane is placed at the right; see Organize->Layout->Details/Preview/Navigation pane.

Just had a quick look at MSDN and Visual Studio samples. Adding preview pane handler means making a viewer plugin for Explorer, eg. just like Adobe Reader enables reading of pdf files directly inside web browsers.
I was thinking about a viewer as an ActiveX dll or something like that anyway (yea I know, hardcore stuff), so I would probably want to do 2 (or more) birds with one stone. And I can't release a half-product, plus gazillion of other development issues/stuff, all in all... "When it's done".

PS. While I was writing this, a crash error appeared "Preview Handler Surrogate Host has stopped working" (process that actually runs preview). It crashed trying to open preview for saved HTML file. LOL
Back to top
View user's profile Send private message Visit poster's website
noboy
Guest





PostPosted: Sun Mar 07, 2010 2:26 am    Post subject: question Reply with quote

Everything looks great after all this time I'm using it, no bugs on my DualCore 2Gig PC too (even on large file contents).

Just a question, now that it thumbnails my zips & rars, do I have a way snag the thumbnail for my personal use - like it cache the thumbnails using windows cache, can it be modified to save it in some folder as jpg?
Back to top
Guest






PostPosted: Sun Mar 07, 2010 10:37 pm    Post subject: Reply with quote

great!
Works perfect on XP here...
Thanks for sharing it!
Back to top
Moebius



Joined: 08 Mar 2009
Posts: 28

PostPosted: Sun Mar 07, 2010 11:22 pm    Post subject: Reply with quote

How can i use it from autohotkey?

I would like to show the thumbnails on a GUI...
Thanks!
_________________
http://monschein.org
Back to top
View user's profile Send private message
alicialgg
Guest





PostPosted: Mon Mar 08, 2010 9:34 am    Post subject: Reply with quote

I installed latest version on windows 7 64x with cdisplay 1.8, but i cant see any thumbnail preview. Is there something I am missing?
Back to top
T800



Joined: 15 Oct 2006
Posts: 88
Location: Croatia

PostPosted: Mon Mar 08, 2010 6:12 pm    Post subject: Reply with quote

How to extract thumbnail in c/c++:
Code:
//don't forget to check for hr==S_OK

   HRESULT hr;
   HBITMAP m_bmp;

   //pointers to COM interfaces
   CComPtr<IUnknown> m_pthumb;//you can use simple IUnknown* or ATL's smart pointer wrapper
   IExtractImage2* m_pIExtractImage2;
   IPersistFile* m_pIPersistFile;

   SIZE s={    ...... , ......   };   //desired thumbnail width/height
   DWORD flags=0;
   IID CLSID_cbxformatExtractor={0x9E6ECB90,0x5A61,0x42BD,0xB8,0x51,0xD3,0x29,0x7D,0x9C,0x7F,0x39};

   //try to instantiate COM object
   hr=m_pthumb.CoCreateInstance(CLSID_cbxformatExtractor, NULL, CLSCTX_INPROC_SERVER);
   hr=m_pthumb->QueryInterface(IID_IPersistFile,(void**) &m_pIPersistFile);
   hr=m_pthumb->QueryInterface(IID_IExtractImage2,(void**) &m_pIExtractImage2);

   //get thumbnail
   hr=m_pIPersistFile->Load(szFile,NULL);             //szFile is a full path to the file (WCHAR)
   hr=m_pIExtractImage2->GetLocation(NULL,NULL,NULL, &s,NULL, &flags);
   hr=m_pIExtractImage2->Extract(&m_bmp);

//m_bmp now contains thumbnail as HBITMAP
//but don't forget to call DeleteObject in the end

   //finish and cleanup
   m_pIPersistFile->Release();
   m_pIExtractImage2->Release();
   m_pThumb->Release();



I suppose this can be translated to autohotkey, but I haven't used it with COM, try here (+forum posts):
http://www.autohotkey.com/docs/commands/DllCall.htm#COM
http://www.autohotkey.com/wiki/index.php?title=COM_Standard_Library

@ alicialgg
Read help file first (see also previous posts), try clearing thumbnail cache to regenerate all thumbnails (see help or google)
while listening to In Flames - As The Future Repeats Today Wink


Last edited by T800 on Thu Apr 08, 2010 2:35 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
alicialgg
Guest





PostPosted: Mon Mar 15, 2010 10:03 pm    Post subject: Reply with quote

it worked! I restarted the computer after installing and bum! all my thumbnail appeared!

This is great, Thank you!
Back to top
finny
Guest





PostPosted: Thu Apr 08, 2010 9:33 am    Post subject: Reply with quote

Thank you so much for doing this. Can't say thanks enough.
Thank you thank you thank you
Back to top
EdwinD
Guest





PostPosted: Wed Apr 21, 2010 9:50 pm    Post subject: Epub support Reply with quote

.EPub files are e-books which are basically zip files with xhtml and (cover) images. Can CBXShell create thumbnails for those aswell? I could get it to work with cdisplayex but the bugs drove me crazy. and i can't get it to work with CBXShell.
Back to top
T800



Joined: 15 Oct 2006
Posts: 88
Location: Croatia

PostPosted: Thu Apr 22, 2010 5:21 pm    Post subject: Reply with quote

By design, I didn't go for binary file recognition because that can be complicated given that archives can be self-extracting exes, etc.
When I get some spare time maybe I'll add something like user-defined file extensions support.
For the moment, I just added if (StrEqual(szExt, _T(".epub"))) return CBXTYPE_CBZ; at line 542 in cbxArchive.h.
32 & 64-bit dll:
http://www.autohotkey.net/~T800/CBX/cbx4203.zip

If you already used installer (if not, use it first to make this simple), you can replace dll files like this:
1. Extract 32 or 64-bit dll from zip (must match your Windows edition).
2. open command prompt (elevated if Vista/7 under UAC)
3. close all windows and applications, then wait a minute or two so that system releases files in use.
4. type in the command prompt: copy "<path of the new (unzipped) dll>" "<path to the old (installed) dll>" (use quotes if needed)
If all OK it will say that it copied 1 file.

Also, the question is if e-books (*.epub....) fall under this topic, because it seems to me that it should be a project for itself, from my experience cb* files are more similar to archives then are e-books which only use compressed file as a container (wikipedia topic on ebooks talks about html, xml, svg, etc.).

After all, the source code ist fur alle da.
Back to top
View user's profile Send private message Visit poster's website
athlonxp
Guest





PostPosted: Sat May 01, 2010 11:17 pm    Post subject: Reply with quote

Could you please compile a binary package without SSE2 optimizations?
Back to top
T800



Joined: 15 Oct 2006
Posts: 88
Location: Croatia

PostPosted: Sun May 02, 2010 1:37 am    Post subject: Reply with quote

Ok, here are dlls without SSE
http://www.autohotkey.net/~T800/CBX/cbx4203noSSE.zip

I could use some feedback on this. Do you run some older hardware?
AFAIK, SSE was introduced in Pentium III in 1999, and SSE2 in P4 processors in 2001.
Here are 3 versions of my test app in release compile: no SSE, SSE, SSE2, optimizations set for speed.
http://www.autohotkey.net/~T800/CBX/SSEtest.zip
Drag and drop files onto dialog to test.
You can tell me how they behave, post messages/screenshots of errors.
Back to top
View user's profile Send private message Visit poster's website
athlonxp
Guest





PostPosted: Sun May 02, 2010 6:53 pm    Post subject: Reply with quote

Well, Athlon XP processors don't support SSE2. The last batch of them came out about 5 years ago, they were really popular, many people still use them. Then netbooks became popular, most didn't support SSE2, the bottom line is hardly anyone optimizes 32-bit desktop applications for SSE2 even today. And, in general, you get better performance from non-SSE2 32-bit binaries than optimized 64-bit ones (although the difference is negligible of course).

I did try the tests but couldn't notice any difference, mainly because results varied wildly with each use. Can you make the test run multiple (50-100) times automatically?

Thanks for the build Smile
Back to top
athlonxp
Guest





PostPosted: Sun May 02, 2010 7:15 pm    Post subject: Reply with quote

And here's the crash report for CBXTest_SSE2.exe on an Athlon XP


Code:
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   CBXTest_SSE2.exe
  Application Version:   0.0.0.0
  Application Timestamp:   4bdcd95d
  Fault Module Name:   CBXTest_SSE2.exe
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   4bdcd95d
  Exception Code:   c000001d
  Exception Offset:   00002c66
  OS Version:   6.1.7600.2.0.0.256.1
  Locale ID:   1033
  Additional Information 1:   0a9e
  Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:   0a9e
  Additional Information 4:   0a9e372d3b4ad19135b953a78882e789
Back to top
T800



Joined: 15 Oct 2006
Posts: 88
Location: Croatia

PostPosted: Mon May 03, 2010 7:28 pm    Post subject: Update available Reply with quote

I tried test app with 100 iterations, and there was no real difference (the only reason I enabled SSE in compiler settings was simply because 'it's there, so crank it up').
I recompiled all without SSE, version 4.4, you can download updated package. This should run on any CPU.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group