NO

Author Topic: [source] Loading images using different techniques  (Read 9872 times)

TBD

  • Guest
[source] Loading images using different techniques
« on: February 13, 2005, 03:05:57 PM »
http://www.rsdn.ru/article/qna/gdi/drawimg.xml

even if it is in russian and C++ code, you can find different techniques to load images (JPEG/GIF/PNG/...) using libraries already on the system (OleLoadPicture,GDI+,IImgCtx,DirectXTransform,Direct3D,...)

enjoy  :lol:

Offline Vortex

  • Member
  • *
  • Posts: 864
    • http://www.vortex.masmcode.com
[source] Loading images using different techniques
« Reply #1 on: February 13, 2005, 05:44:03 PM »
Hi TBD,

Thanks for the link. It would be good to have a translation to english.

I have a little project to display BMPs from files:

http://smorgasbordet.com/phpBB2/viewtopic.php?t=260
Code it... That's all...

TBD

  • Guest
[source] Loading images using different techniques
« Reply #2 on: February 13, 2005, 05:52:27 PM »
heya Vortex,
I know the display BMPs from files example =D>

I am interested in displaying embedded PNG images, so I am looking for a solution without the need of external libraries in my exe. now I am using PNGLib

you can use an online translation service, for example check this translation

it would be nice to have the example translated to PellesC  :roll:

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
[source] Loading images using different techniques
« Reply #3 on: February 13, 2005, 09:34:04 PM »
The attached file should work - it uses the IImgCtx interface (from mshtml.dll). It will display images using an URL, so local files or web files will both work. If this works for you too, I will add it as a sample to the source code section...

Pelle
/Pelle

TBD

  • Guest
[source] Loading images using different techniques
« Reply #4 on: February 13, 2005, 09:46:12 PM »
thanks Pelle !

you should add this to remove the flicker on resize:
Code: [Select]

case WM_ERASEBKGND:
 return 1;


it is possible to use relative paths instead of fixed ? I tried with file://./test.png and doesn't work (I have the test.png in .exe dir  :lol: )

... now I must found the way to load the image from memory instead of URL   :roll:

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
[source] Loading images using different techniques
« Reply #5 on: February 13, 2005, 09:54:29 PM »
Quote from: "TBD"
you should add this to remove the flicker on resize:
Code: [Select]

case WM_ERASEBKGND:
 return 1;


a) it's a sample
b) the text output will look terrible...

Quote from: "TBD"

it is possible to use relative paths instead of fixed ? I tried with file://./test.png and doesn't work (I have the test.png in .exe dir  :lol: )

Not a clue - I have very little information about limitations, requirements, supported formats...

Pelle
/Pelle

Offline Vortex

  • Member
  • *
  • Posts: 864
    • http://www.vortex.masmcode.com
[source] Loading images using different techniques
« Reply #6 on: March 03, 2005, 01:30:17 PM »
Here is a tiny example using Ernest Murphy's image library. It can handle JPG, BMP, GIF and WMF images.
Code it... That's all...

Offline Vortex

  • Member
  • *
  • Posts: 864
    • http://www.vortex.masmcode.com
[source] Loading images using different techniques
« Reply #7 on: March 03, 2005, 05:44:39 PM »
Hi friends,

There was a local bug in Ernest Murphy's image displaying function BitmapFromFile.asm

Thanks to El_Choni for discovering and fixing this bug:

http://board.win32asmcommunity.net/viewtopic.php?t=10650

f0dder suggested fixing another bug found in BitmapFromMemory.asm

http://board.win32asmcommunity.net/viewtopic.php?p=145356#145356

This second improved version uses the BitmapFromFile.asm function simplifying the job.
Code it... That's all...