(
float)width / (float)height;
133 doublerender_time = 0;
134 doubleimage_flip_time = 0;
141 LOG_POST(
Error<<
"CGlCgiImageApplication::ProcessRequest(): " 142 "Failed to make off-screen renderer current");
172 catch(std::exception& e) {
183 stringencoding(
"image/unknown");
186encoding =
type->m_Encoding;
209 doubleimage_encode_time =
sw.
Elapsed();
211<<
" render time = "<< render_time <<
"\n" 212<<
" process time = "<< image_flip_time - render_time <<
"\n" 213<<
" encode time = "<< image_encode_time - image_flip_time <<
"\n");
243 ctx.GetRequest().GetEntries().find(
"width");
244 if(width_iter !=
ctx.GetRequest().GetEntries().end()) {
249 ctx.GetRequest().GetEntries().find(
"height");
250 if(height_iter !=
ctx.GetRequest().GetEntries().end()) {
257 ctx.GetRequest().GetEntries().find(
"fmt");
258 if(fmt_iter !=
ctx.GetRequest().GetEntries().end()) {
259 stringfmt(fmt_iter->second);
virtual void x_PreProcess(CCgiContext &ctx)
~CGlCgiImageApplication()
CRef< CGlOsContext > m_Context
virtual void Render(CCgiContext &ctx)=0
CGlOsContext & x_GetContext(void)
virtual void x_HandleError(CCgiContext &ctx, const string &msg)
virtual void Init(void)
This method is called on the CGI application initialization â before starting to process a HTTP reque...
virtual int ProcessRequest(CCgiContext &ctx)
This is the method you should override.
float GetAspectRatio(void) const
virtual void x_PostProcess(CCgiContext &ctx)
const CImage & GetBuffer(void) const
static bool WriteImage(const CImage &image, CNcbiOstream &ostr, EType type, ECompress compress=eCompress_Default)
static EType GetTypeFromFileName(const string &file)
static void FlipY(CImage &image)
size_t GetWidth(void) const
size_t GetHeight(void) const
void SetDepth(size_t depth, bool update_image=true)
container_type::const_iterator const_iterator
static const SContentType kContentTypes[]
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
CNcbiOstream & out(void) const
Get output stream. Throw exception if GetOutput() is NULL.
void SetContentType(const string &type)
Set content type (text/html by default if not provided)
CNcbiOstream & WriteHeader(void) const
Write HTTP response header to the output stream.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
void Info(CExceptionArgs_Base &args)
virtual void AddTagMap(const string &name, BaseTagMapper *mapper)
Tag mappers.
CNCBINode * AppendChild(CNCBINode *child)
virtual CNcbiOstream & Print(CNcbiOstream &out, TMode mode=eHTML)
void Reset(void)
Reset reference object.
virtual const string & Get(const string §ion, const string &name, TFlags flags=0) const
Get the parameter value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4