Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » WebImage example not working (Examples)
Re: WebImage example not working [message #56070 is a reply to message #56033] Tue, 19 January 2021 23:22 Go to previous messageGo to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello Dschoni,

Glad to help ! you don't need to add
#include <Core/SSL/SLL.h>
. The only thing you need to do is adding the package to your project :

Here is my project without Core/SSL package :
https://i.imgur.com/WajbiaH.png

At this point, my following code :
#include <Core/Core.h>
#include <Draw/Draw.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	Image img = StreamRaster::LoadStringAny(HttpRequest("https://www.ultimatepp.org/0i.png").Execute());
}


Will compile and work but my Img wont be loaded because HttpRequest is not performing all SSL requieremet. That's why Core/SSL have been created.

By right clicking to my main package (testimg in my screenshot) and select "Add package to testimg"
https://i.imgur.com/xn6NzbZ.png
I'm able to add Core/SSL to my project :
https://i.imgur.com/QWoOUbz.png

Since Core/SSL is part of Core (it can be see as kind of plugin) I'm not obligated to include it in my project.
By now, my exemple above will work and download the image.

PS: Also, if you plan on doing more stuff about loading image, or play with several image type, be sure to include all format you need (package plugin/png, plugin/bmp, plugin/gif...) otherwise, the StreamRaster::LoadStringAny(...) wont be able to convert your image data into standard U++ Image

[Updated on: Wed, 20 January 2021 09:20]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cross Compiling?
Next Topic: CallbackN<> storing pointer to member function
Goto Forum:
  


Current Time: Sun Aug 24 19:23:43 CEST 2025

Total time taken to generate the page: 0.05024 seconds