#include "vtkvmtkPNGWriter.h"
#include "vtkUnsignedCharArray.h"
#include "vtkImageData.h"
#include "vtkPointData.h"
#include "vtkErrorCode.h"
#include "vtkObjectFactory.h"
#include "vtkVersion.h"
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include <math.h>
#include <string.h>
Go to the source code of this file.
◆ base64_encode()
| long base64_encode |
( |
char * | to, |
|
|
char * | from, |
|
|
unsigned int | len ) |
Definition at line 41 of file vtkvmtkPNGWriter.cxx.
42{
43 char *fromp = from;
44 char *top = to;
45 unsigned char cbyte;
46 unsigned char obyte;
47 char end[3];
48
49 for (; len >= 3; len -= 3) {
50 cbyte = *fromp++;
52 obyte = (cbyte << 4) & 0x30;
53
54 cbyte = *fromp++;
55 obyte |= (cbyte >> 4);
57 obyte = (cbyte << 2) & 0x3C;
58
59 cbyte = *fromp++;
60 obyte |= (cbyte >> 6);
63 }
64
65 if (len) {
66 end[0] = *fromp++;
67 if (--len) end[1] = *fromp++; else end[1] = 0;
68 end[2] = 0;
69
70 cbyte = end[0];
72 obyte = (cbyte << 4) & 0x30;
73
74 cbyte = end[1];
75 obyte |= (cbyte >> 4);
77 obyte = (cbyte << 2) & 0x3C;
78
80 else *top++ = '=';
81 *top++ = '=';
82 }
83 *top = 0;
84 return top - to;
85}
◆ vtkStandardNewMacro()
◆ b64string
Initial value:=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Definition at line 38 of file vtkvmtkPNGWriter.cxx.