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 » StreamRasterEncoder?
StreamRasterEncoder? [message #49298] Thu, 18 January 2018 05:29 Go to next message
ptkacz is currently offline  ptkacz
Messages: 89
Registered: March 2017
Member
Hi Guys,

I've seen examples like,
Image   img;
FileSel fs;
...
img = StreamRaster::LoadFileAny(~fs);

to read in an image stored in local storage, etc...

Thinking that StreamRasterEncoder probably works the same, but for encoding and writing out an image file, I've tried the following without success:
    String file = "...";
    ImageBuffer ib;
    ... do stuff...
    Image img = ib;
        
    StreamRasterEncoder::SaveFile(file.Begin(), img);

What I get is the following compiler error message, "error: cannot call member function 'bool Upp::StreamRasterEncoder::SaveFile(const char*, const Upp::Image&)' without object"

How does one invoke StreamRasterEncoder's SaveFile method?

Peter

[Updated on: Thu, 18 January 2018 05:36]

Report message to a moderator

Re: StreamRasterEncoder? [message #49303 is a reply to message #49298] Sun, 21 January 2018 04:22 Go to previous message
ptkacz is currently offline  ptkacz
Messages: 89
Registered: March 2017
Member
Issue solved. Unfortunately it looks like one would inherit the StreamRasterEncoder class and build a class around that. The JPGEncoder, PNGEncoder and TIFEncoder classes fit the bill!


Peter

[Updated on: Sun, 21 January 2018 04:31]

Report message to a moderator

Previous Topic: Passing an ArrayCtrl / SqlArray to a function template
Next Topic: Stacked column chart
Goto Forum:
  


Current Time: Thu Mar 28 19:52:12 CET 2024

Total time taken to generate the page: 0.01422 seconds