added: a new winix function: imgcrop
for cropping images (and thumbnails)
www.domain.com/dir/file.jpg/imgcrop -- crop an image
www.domain.com/dir/file.jpg/imgcrop/thumb -- crop an image's thumbnail
www.domain.com/dir/file.jpg/imgcrop/newthumb -- crop and create a new thumbnail (from an original image)
www.domain.com/dir/imgcrop -- show images' list with above options
added: to Image class: some methods for cropping
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@919 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include "misc.h"
|
||||
#include "log.h"
|
||||
#include "templates/templates.h"
|
||||
@@ -77,6 +78,34 @@ long Tol(const wchar_t * str, int base)
|
||||
|
||||
|
||||
|
||||
double Tod(const std::string & str)
|
||||
{
|
||||
return strtod(str.c_str(), 0);
|
||||
}
|
||||
|
||||
|
||||
double Tod(const std::wstring & str)
|
||||
{
|
||||
return wcstold(str.c_str(), 0);
|
||||
}
|
||||
|
||||
|
||||
double Tod(const char * str)
|
||||
{
|
||||
return strtod(str, 0);
|
||||
}
|
||||
|
||||
|
||||
double Tod(const wchar_t * str)
|
||||
{
|
||||
return wcstold(str, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const wchar_t * Toa(unsigned int value, int base)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user