0

I'm writing a plugin in firebreath, C++.

I don't have any experience with both, so my question may be very basic.

How do I place a JPEG image inside my plugin window? Or at least, how do I do it in C++ simple program?

Thanks,

RRR

1
  • What operating system are you using?
    – taxilian
    May 27, 2011 at 7:09

2 Answers 2

0

There are a couple of other questions that may help you better understand this:

How to write a web browser plugin for IE, Firefox and Chrome

Directx control in browser plugin

Basically you'll get a drawing model from FireBreath with the AttachedEvent. Depending on your platform, you will draw to that window using platform-specific drawing APIs. On Windows, for example, you would get the HWND from the PluginWindow (cast it to a PluginWindowWin) and then draw to that. Just make sure you stop drawing when DetachedEvent shows up.

For more information, you'll need to be a lot more specific; but follow those links and do some reading, then you'll know better what questions to ask.

FireBreath 1.5.2 was just released, btw! Good luck!

Good luck!

0

You can also use OpenGL to display images in plugin. You can get several tutorials to load jpeg image in OpenGL as texture. Same code can be ported into the Firebreath plugin using the already given OpenGL sample plugin for windows. Though OpenGL context creation will vary from one OS to the other. If you want to load jpeg images from web, you'll have to download image before converting it into opengl texture.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.