So I see samples all around on saving into file. But I wonder if it is possible to save into char* or string instead of file - so to say keep it in memory?
Boost::GIL How to save image as JPEG or PNG into char*?
2.3k Views Asked by Rella At
2
There are 2 best solutions below
0
albezanc
On
Boost.GIL v1.75: reading this docs at the section "Reading And Writing In-Memory Buffers" seems boost::gil::write_view(...) can also write into a memory buffer. Please see also this question
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in BOOST
- Non-intruisive Boost serialization of labelled enums C++
- error WinSock.h has already been included Boost Windows Qt
- How to get rid of the ".\r\n" characters appended to the error message from FormatMessageA?
- What is the equivalent of boost::system::error_code with GetLastError in C++ Standard Library?
- Copy constructor required to be explicity defined with mutex
- boost spirit: how to match any lexer token in qi?
- boost resume thread on mutex unlock
- boost mpi sends NULL messages
- BOOST & GCC, undefined reference to boost
- CSV like Parse ( whitespace delimiter and boost )
- How does Boost.Units come up with this imprecise result of conversion?
- No viable overloaded '=' in std::bind function
- How should boost::lockfree::spsc_queue's read_available and write_available be used?
- add line in cmake to edit Makefile definition
- How does boost::subgraph work? Can we use filtered graph?
Related Questions in SAVE
- Trying to save an np array with string and floats, but getting a error
- saving matlab file (.mat) with dynamic name
- Saving Data form in CakePHP
- Python - Pickle init takes 4 arguments - 1 given
- Losing values after reading from file and saving np array to the same file
- Android: Intentionally Blank Lines in EditText Are Not Getting Saved
- How to save cell value(image) of a vertical grid control (devexpress) to sql database?
- Open in same view controller as closed on (swift)
- MvvmCross on iOS - Strategies for Saving and Restoring State
- How to make a save button
- C# - Settings.Default.Save() is very slow
- Saving text in labels
- Python: Can you Save an Object and all of it's Associated Values?
- Implementing both Serializable and Parcelable interfaces from an object in Android - conflict
- Disable Excel save option but allow macro save
Related Questions in JPEG
- convert a jpg file to UTF-8 without making it corrupt
- How can I add an image in the drawable/res folder?
- How to perform JPEG compression in Python without writing/reading
- PPT VBA: Capturing Screen Shot inside Shape
- In Ruby, how can I update the avatar / background image file.jpg in a folder?
- Best way to edit a JPG in Photoshop
- IOError for savefig JPG in matplotlib
- Why Bitmap.Save changes image's size?
- Effective JPEG compression for HF content?
- zoom jpeg image on canvas with mousewheel event in javascript
- TIFF 204x98 DPI screen dimensions
- images with invalid jpeg marker
- Android: Embedding a compressed image inside a PDF document
- IJG library or Windows photo viewer DQT generation
- Getting JPEG with android
Related Questions in BOOST-GIL
- save png from the results of glReadPixels
- gil boost : convert rgb8_image_t to rgba8_image_t
- Boost::GIL: reading *.png image with alpha channel is missing antialiasing
- C# Design guidance for generic image processing library
- Read image and access bytes in boost::gil
- Boost GIL write_view throws LNK2019 errors
- Boost Gil is able to rasterize a font?
- How to combine images with boost gil?
- Does boost::gil support 10 bit images?
- Boost::GIL How to save image as JPEG or PNG into char*?
- Reading png images with gil
- how to link lpng package
- Using Boost.GIL to convert an image into "raw" bytes
- Boost GIL image constructors
- Creating image with Boost.GIL
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There doesn't seem to be anything to facilitate this in boost itself. All I/O seems to be based on supplying filenames.
However, there seems to be an extension here called
io_newthat has streams based I/O.See documentation here for an example (search for "Reading And Writing In-Memory Buffers").