\documentclass[11pt,twoside]{article}\makeatletter

\IfFileExists{xcolor.sty}%
  {\RequirePackage{xcolor}}%
  {\RequirePackage{color}}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec}
  \usepackage{xunicode}
  \catcode`⃥=\active \def⃥{\textbackslash}
  \catcode`❴=\active \def❴{\{}
  \catcode`❵=\active \def❵{\}}
  \def\textJapanese{\fontspec{Noto Sans CJK JP}}
  \def\textChinese{\fontspec{Noto Sans CJK SC}}
  \def\textKorean{\fontspec{Noto Sans CJK KR}}
  \setmonofont{DejaVu Sans Mono}
  
\else
  \IfFileExists{utf8x.def}%
   {\usepackage[utf8x]{inputenc}
      \PrerenderUnicode{–}
    }%
   {\usepackage[utf8]{inputenc}}
  \usepackage[english]{babel}
  \usepackage[T1]{fontenc}
  \usepackage{float}
  \usepackage[]{ucs}
  \uc@dclc{8421}{default}{\textbackslash }
  \uc@dclc{10100}{default}{\{}
  \uc@dclc{10101}{default}{\}}
  \uc@dclc{8491}{default}{\AA{}}
  \uc@dclc{8239}{default}{\,}
  \uc@dclc{20154}{default}{ }
  \uc@dclc{10148}{default}{>}
  \def\textschwa{\rotatebox{-90}{e}}
  \def\textJapanese{}
  \def\textChinese{}
  \IfFileExists{tipa.sty}{\usepackage{tipa}}{}
\fi
\def\exampleFont{\ttfamily\small}
\DeclareTextSymbol{\textpi}{OML}{25}
\usepackage{relsize}
\RequirePackage{array}
\def\@testpach{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \else
    \if \@nextchar l\@ne \else
     \if \@nextchar r\tw@ \else
   \z@ \@chclass
   \if\@nextchar |\@ne \else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \else
      \if \@nextchar (8 \else
       \if \@nextchar )9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@\else
   \if \@nextchar p4 \else
    \if \@nextchar b5 \else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\gdef\arraybackslash{\let\\=\@arraycr}
\def\@textsubscript#1{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\def\abbr{}
\def\corr{}
\def\expan{}
\def\gap{}
\def\orig{}
\def\reg{}
\def\ref{}
\def\sic{}
\def\persName{}\def\name{}
\def\placeName{}
\def\orgName{}
\def\textcal#1{{\fontspec{Lucida Calligraphy}#1}}
\def\textgothic#1{{\fontspec{Lucida Blackletter}#1}}
\def\textlarge#1{{\large #1}}
\def\textoverbar#1{\ensuremath{\overline{#1}}}
\def\textquoted#1{‘#1’}
\def\textsmall#1{{\small #1}}
\def\textsubscript#1{\@textsubscript{\selectfont#1}}
\def\textxi{\ensuremath{\xi}}
\def\titlem{\itshape}
\newenvironment{biblfree}{}{\ifvmode\par\fi }
\newenvironment{bibl}{}{}
\newenvironment{byline}{\vskip6pt\itshape\fontsize{16pt}{18pt}\selectfont}{\par }
\newenvironment{citbibl}{}{\ifvmode\par\fi }
\newenvironment{docAuthor}{\ifvmode\vskip4pt\fontsize{16pt}{18pt}\selectfont\fi\itshape}{\ifvmode\par\fi }
\newenvironment{docDate}{}{\ifvmode\par\fi }
\newenvironment{docImprint}{\vskip 6pt}{\ifvmode\par\fi }
\newenvironment{docTitle}{\vskip6pt\bfseries\fontsize{22pt}{25pt}\selectfont}{\par }
\newenvironment{msHead}{\vskip 6pt}{\par}
\newenvironment{msItem}{\vskip 6pt}{\par}
\newenvironment{rubric}{}{}
\newenvironment{titlePart}{}{\par }

\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}
\definecolor{label}{gray}{0.75}
\def\unusedattribute#1{\sout{\textcolor{label}{#1}}}
\DeclareRobustCommand*{\xref}{\hyper@normalise\xref@}
\def\xref@#1#2{\hyper@linkurl{#2}{#1}}
\begingroup
\catcode`\_=\active
\gdef_#1{\ensuremath{\sb{\mathrm{#1}}}}
\endgroup
\mathcode`\_=\string"8000
\catcode`\_=12\relax

\usepackage[a4paper,twoside,lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in,marginparwidth=0.75in]{geometry}
\usepackage{framed}

\definecolor{shadecolor}{gray}{0.95}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{marginnote}

\renewcommand{\@cite}[1]{#1}


\renewcommand*{\marginfont}{\itshape\footnotesize}

\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif}

  \pagestyle{fancy}

\usepackage[pdftitle={An Ambigramic Image File Format},
 pdfauthor={}]{hyperref}
\hyperbaseurl{}

	 \paperwidth210mm
	 \paperheight297mm
              
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
\clubpenalty=8000
\emergencystretch 3em
\hbadness=4000
\hyphenpenalty=400
\pretolerance=750
\tolerance=2000
\vbadness=4000
\widowpenalty=10000

\renewcommand\section{\@startsection {section}{1}{\z@}%
     {-1.75ex \@plus -0.5ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
     {-1.75ex\@plus -0.5ex \@minus- .2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
     {-1.5ex\@plus -0.35ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\large}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
     {-1ex \@plus-0.35ex \@minus -0.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\normalsize}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
     {1.5ex \@plus1ex \@minus .2ex}%
     {-1em}%
     {\reset@font\normalsize\bfseries}}


\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
 \@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth 
 \parfillskip -\@pnumwidth 
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
 \endgroup}
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\@ifundefined{c@section}{\newcounter{section}}{}
\@ifundefined{c@chapter}{\newcounter{chapter}}{}
\newif\if@mainmatter 
\@mainmattertrue
\def\chaptername{Chapter}
\def\frontmatter{%
  \pagenumbering{roman}
  \def\thechapter{\@roman\c@chapter}
  \def\theHchapter{\roman{chapter}}
  \def\thesection{\@roman\c@section}
  \def\theHsection{\roman{section}}
  \def\@chapapp{}%
}
\def\mainmatter{%
  \cleardoublepage
  \def\thechapter{\@arabic\c@chapter}
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \pagenumbering{arabic}
  \setcounter{secnumdepth}{6}
  \def\@chapapp{\chaptername}%
  \def\theHchapter{\arabic{chapter}}
  \def\thesection{\@arabic\c@section}
  \def\theHsection{\arabic{section}}
}
\def\backmatter{%
  \cleardoublepage
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \setcounter{secnumdepth}{2}
  \def\@chapapp{\appendixname}%
  \def\thechapter{\@Alph\c@chapter}
  \def\theHchapter{\Alph{chapter}}
  \appendix
}
\newenvironment{bibitemlist}[1]{%
   \list{\@biblabel{\@arabic\c@enumiv}}%
       {\settowidth\labelwidth{\@biblabel{#1}}%
        \leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \@openbib@code
        \usecounter{enumiv}%
        \let\p@enumiv\@empty
        \renewcommand\theenumiv{\@arabic\c@enumiv}%
	}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}%
  {\def\@noitemerr
    {\@latex@warning{Empty `bibitemlist' environment}}%
    \endlist}

\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
\parskip0pt
\parindent1em
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\newenvironment{reflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemsep}{0pt}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\itshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{sansreflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\itemsep}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\upshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{specHead}[2]%
 {\vspace{20pt}\hrule\vspace{10pt}%
  \phantomsection\label{#1}\markright{#2}%

  \pdfbookmark[2]{#2}{#1}%
  \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}%
  }{}
      \def\TheFullDate{2021-01-15 (revised: 15 January 2021)}
\def\TheID{10.34257/GJCSTFVOL21IS1PG1\makeatother }
\def\TheDate{2021-01-15}
\title{An Ambigramic Image File Format}
\author{}\makeatletter 
\makeatletter
\newcommand*{\cleartoleftpage}{%
  \clearpage
    \if@twoside
    \ifodd\c@page
      \hbox{}\newpage
      \if@twocolumn
        \hbox{}\newpage
      \fi
    \fi
  \fi
}
\makeatother
\makeatletter
\thispagestyle{empty}
\markright{\@title}\markboth{\@title}{\@author}
\renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
               \topsep 2\p@ plus1\p@ minus1\p@
               \parsep 2\p@ plus\p@ minus\p@
               \itemsep 1pt}
}
\makeatother
\fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm}
\fancyhf{} 
\setlength{\headheight}{14pt}
\fancyhead[LE]{\bfseries\leftmark} 
\fancyhead[RO]{\bfseries\rightmark} 
\fancyfoot[RO]{}
\fancyfoot[CO]{\thepage}
\fancyfoot[LO]{\TheID}
\fancyfoot[LE]{}
\fancyfoot[CE]{\thepage}
\fancyfoot[RE]{\TheID}
\hypersetup{citebordercolor=0.75 0.75 0.75,linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}

\date{}
\usepackage{authblk}

\providecommand{\keywords}[1]
{
\footnotesize
  \textbf{\textit{Index terms---}} #1
}

\usepackage{graphicx,xcolor}
\definecolor{GJBlue}{HTML}{273B81}
\definecolor{GJLightBlue}{HTML}{0A9DD9}
\definecolor{GJMediumGrey}{HTML}{6D6E70}
\definecolor{GJLightGrey}{HTML}{929497} 

\renewenvironment{abstract}{%
   \setlength{\parindent}{0pt}\raggedright
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
   \textcolor{GJBlue}{\large\bfseries\abstractname\space}
}{%   
   \vskip8pt
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
}

\usepackage[absolute,overlay]{textpos}

\makeatother 
      \usepackage{lineno}
      \linenumbers
      
\begin{document}

             \author[1]{Kohei  Inoue}

             \author[2]{Wenyi  Cui}

             \author[3]{Kenji  Hara}

             \affil[1]{  Kyushu University}

\renewcommand\Authands{ and }

\date{\small \em Received: 11 December 2020 Accepted: 3 January 2021 Published: 15 January 2021}

\maketitle


\begin{abstract}
        


We propose an image file format that can be read in two ways, where two images are recorded in a single file as a bit sequence, and the forward reading the bit sequence makes one of the two images visible, or the backward reading makes another image visible. Such a way of looking at a binary data in two ways resembles that of an ambigram, which is a piece of calligraphy that can be read in two ways by rotating it or introducing other perspectives. The proposed ambigramic image file format is compared with the graphics interchange format (GIF) experimentally, and the results show the better quality of the ambigramic images than that of GIF images.

\end{abstract}


\keywords{ambigram, image file format, error diffusion, integral image-based signal-to-noise ratio (ISNR).}

\begin{textblock*}{18cm}(1cm,1cm) % {block width} (coords) 
\textcolor{GJBlue}{\LARGE Global Journals \LaTeX\ JournalKaleidoscope\texttrademark}
\end{textblock*}

\begin{textblock*}{18cm}(1.4cm,1.5cm) % {block width} (coords) 
\textcolor{GJBlue}{\footnotesize \\ Artificial Intelligence formulated this projection for compatibility purposes from the original article published at Global Journals. However, this technology is currently in beta. \emph{Therefore, kindly ignore odd layouts, missed formulae, text, tables, or figures.}}
\end{textblock*}


\begin{textblock*}{10cm}(1.05cm,3cm)
{{\textit{CrossRef DOI of original article:}} \underline{10.34257/GJCSTFVOL21IS1PG1}}
\end{textblock*}\let\tabcellsep& 	 	 		 
\section[{Introduction}]{Introduction}\par
mbigram is a typographical design that can be read in multiple orientations as shown in Fig. \hyperref[fig_0]{1}, where a word 'ambigram' is written in a rotationally symmetric manner. There are other types of ambigrams such as mirror, perceptual shift and 3D ambigrams \hyperref[b0]{[1]}. Langdon \hyperref[b1]{[2]}, \hyperref[b2]{[3]} has made a lot of interesting ambigrams for a long time. Those ambigramic artworks give pleasure to the viewers, and provide great inspiration for artists and engineers. Inspired by such successful ambigrams, in this paper we suggest an application of the idea of ambigram to an ambigramic interpretation of a bit sequence. In other words, we propose a method for describing two images with a bit sequence, which is a digital ambigram that can be seen as one of the two images if the bit sequence is read forward direction, or as another image if the bit sequence is read backward direction. The proposed ambigramic images are compared with the graphics interchange format (GIF) images \hyperref[b3]{[4]}, and the effectiveness of the proposed method is demonstrated in the experiments using natural images, where an image quality measure is used for evaluating the quality of halftone images including palette-based images such as GIF images.\par
The rest of this paper is organized as follows: Section 2 describes the proposed algorithm for generating ambigramic bit sequences. Section 3 shows experimental results. Finally, Section 4 concludes this paper. 
\section[{II.}]{II.} 
\section[{Proposed Ambigramic Image Data Structure}]{Proposed Ambigramic Image Data Structure}\par
In this section, we propose a method for formatting image data into an ambigramic data structure, which is recorded in a binary file. Assume that two images are given as an input data as A = [a ij ] and B = [b ij ], where a ij and b ij denote color vectors at the pixel position (i; j) in the images A and B, respectively, for i = 1; 2; : : : ;m and j = 1; 2; : : : ; n, i.e., A and B are the same size. Then we attempt to store A and B in a storage as a single file. Figure \hyperref[fig_1]{2} illustrates the situation, where A and B are represented by a bit sequence, and stored in some place of a storage. If we read the bit sequence from left to right, then we see the image A. On the other hand, if we read it from right to left, then we see the image B. The procedure for constructing such a bit sequence from A and B is described as follows. Abstract-We propose an image file format that can be read in two ways, where two images are recorded in a single file as a bit sequence, and the forward reading the bit sequence makes one of the two images visible, or the backward reading makes another image visible. Such a way of looking at a binary data in two ways resembles that of an ambigram, which is a piece of calligraphy that can be read in two ways by rotating it or introducing other perspectives. The proposed ambigramic image file format is compared with the graphics interchange format (GIF) experimentally, and the results show the better quality of the ambigramic images than that of GIF images. where the horizontally adjacent pixels are separated by semicolons. Next, we reverse the order of the bit sequence in (2) as follows:\par
where note that the third subscripts (1:4) is also reversed as (4:1), e.g., ?? 1,1,4:1?? denotes ?? 1,1,4 ?? ?? 1,1,3 ?? ?? 1,1,2 ?? ?? 1,1,1\par
?? . Then we combine (  {\ref 1}) and (  {\ref 3}) as follows:\par
The proposed error diffusion algorithm is described as follows. For one image A, all pixels are processed in a standard raster scan order, and at the same time, for another image B, all pixels are processed in the inverse raster scan order. For the first pixel in image A, the original color vector a 1,1 changes to\par
Where k and l denote relative indices to access the neighboring pixels, and w k,l denotes error diffusion coefficients or error filter \hyperref[b4]{[5]}. On the other hand, for the last pixel in image B, the original color vector b m,n changes to Subtracting b ?m,n from b m,n , we define an error vector by which is diffused to unprocessed neighboring pixels as where note that the sign of the relative indices k and l is reversed except in w k,l because of the inverse raster scan.\par
After the above error diffusion procedures in ( \hyperref[formula_3]{7}) and (10), we proceed to the next pixels a 1,2 and b m,n?1 , and the error diffusion procedures are repeated until the end of the scan.r A 1,1,1:4 , g A 1,1,1:4 , b A 1,1,1:4 ; r A 1,2,1:4 , g A 1,2,1:4 , b A 1,2,1:4 ; ? ? ? ? ? ? ; r A m,n,1:4 , g A m,n,1:4 , b A m,n,1:4 (1) r B 1,1,1:4 , g B 1,1,1:4 , b B 1,1,1:4 ; r B 1,2,1:4 , g B 1,2,1:4 , b B 1,2,1:4 ; ? ? ? ? ? ? ; r B m,n,1:4 , g B m,n,1:4 , b B m,n,1:4 (2) b B m,n,4:1 , g B m,n,4:1 , r B m,n,4:1 ; ? ? ? ? ? ? ; b B 1,2,4:1 , g B 1,2,4:1 , r B 1,2,4:1 ; b B 1,1,4:1 , g B 1,1,4:1 , r B 1,1,4:1 (3) (r A 1,1,1:4 |b B m,n,4:1 ) 2 ,(g A 1,1,1:4 |g B m,n,4:1 ) 2 , (b A 1,1,1:4 |r B m,n,4:1 ) 2 ; ? ? ? ; (r A m,n,1:4 |b B 1,1,4:1 ) 2 ,(g A m,n,1:4 |g B 1,1,4:1 ) 2 , (b A m,n,1:4 |r B 1,1,4:1 ) 2 (4) ã1,1 = ? ? (r A 1,1,1:4 |b B m,n,4:1 ) 2 (g A 1,1,1:4 |g B m,n,4:1 ) 2 (b A 1,1,1:4 |r B m,n,4:1 ) 2 ? ? . (\textbf{5}) e A 1,1 = a 1,1 ? ã1,1 ,\textbf{(6)}a 1+k,1+l a 1+k,1+l + w k,l e A 1,1 ,\textbf{(7) bm},n = ? ? (r B m,n,1:4 |b A 1,1,4:1 ) 2 (g B m,n,1:4 |g A 1,1,4:1 ) 2 (b B m,n,1:4 |r A 1,1,4:1 ) 2 ? ? . (\textbf{8})\par
Algorithm 1 Constructing ambigramic bit sequence for i 1 to m do6: i R m + 1 ? i 7:\par
for j 1 to n do8: j R n + 1 ? j 9:\par
Round the elements of a ij and b i R ,j R to 8-bit integers 10:ãij ? ? (r A i,j,1:4 |b B i R ,j R ,4:1 ) 2 (g A i,j,1:4 |g B i R ,j R ,4:1 ) 2 (b A i,j,1:4 |r B i R ,j R ,4:1 ) 2 ? ? 11: bi R ,j R ? ? (r B i R ,j R ,1:4 |b A i,j,4:1 ) 2 (g B i R ,j R ,1:4 |g A i,j,4:1 ) 2 (b B i R ,j R ,1:4 |r A i,j,4:1 ) 2 ? ? 12: e A ij a ij ? ãij 13: e B i R ,j R b i R ,j R ? bi R ,j R 14:\par
for (k, l) ? KL ij do 15:\par
a i+k,j+l a i+k,j+l + w k,l e A i,j\par
16: b i R ?k,j R ?l b i R ?k,j R ?l + w k,l e B i R ,j Rb m?k,n?l b m?k,n?l + w k,l e B m,n ,\textbf{(9)}\par
© 2021 Global Journals 
\section[{Global Journal of Computer Science and Technology}]{Global Journal of Computer Science and Technology}\par
Volume XXI Issue I Version I 
\section[{( )}]{( )}\par
Year 2021\par
An Ambigramic Image File Format 
\section[{F}]{F}\par
Our basic principle is to preserve more significant bits of the original image data in the resultant ambigramic image file. Following this principle, we first extract four MSBs from both A and B as follows: which can be viewed as an ambigramic bit sequence, because if we read the bit sequence in (4) from left to right then the four MSBs in every pixel show the image A, on the other hand, if we read it from right to left then the four LSBs in every pixel are inversely read to show the image B. However, the resultant images can be corrupted by the replacement of the original four LSBs with others. To alleviate such a quality deterioration in the images, we next propose an error diffusion algorithm for generating better bit sequence, which improves the visual quality of the images.\par
Subtracting ã 1,1 from a 1,1 , we define an error vector by which is diffused to unprocessed neighboring pixels as? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\par
The proposed error diffusion procedure is summarized in Algorithm 1, where the function 'zeros\textunderscore like' returns an array of zeros being the same III. 
\section[{Experimental Results}]{Experimental Results}\par
In this section, we demonstrate the performance of the proposed method for formatting image data into an ambigramic data structure.\par
First, we show an example of the proposed ambigramic image data with two images selected from the standard image database SIDBA \hyperref[b5]{[6]}. Figures \hyperref[fig_5]{3(a}    \hyperref[fig_8]{5(c}) and  {\ref (d)} show the graphics interchange format (GIF) images, and the GIF format is widely used on the Web due to its wide support and portability \hyperref[b3]{[4]}. Figures \hyperref[fig_8]{5 (e) and (f)} show the results of the proposed ambigramic method without error diffusion (ED), where a daruma (dharma) doll and a beckoning cat can be seen as well as the above GIF images. Figures \hyperref[fig_8]{5(g}) and (h) show the results with ED (Algorithm 1), where we used Floyd and Steinberg's error filter \hyperref[b6]{[7]} for w k,l in ( \hyperref[formula_3]{7}) and (10) as shown in Fig. \hyperref[fig_9]{6} where "\#" denotes the current pixel being processed, and "-" denotes the past pixel, and the visual quality is improved compared with the former results (e) and (f).  The GIF images are palette-based ones each of which has a palette table of 256 colors. That is, the GIF images are a sort of halftone images \hyperref[b4]{[5]} as well as the proposed ambigramic images. To evaluate the quality of those images objectively and quantitatively, we present a parameter-free measure based on integral image \hyperref[b7]{[8]}.\par
-\# w 0,1 = First, we compute the integral images of both reference (original) R and test (format-converted) T images, which are denoted as = [ ] and =[ ], respectively. Then we compute the signal-to-noise ratio (SNR) \hyperref[b8]{[9]} of the integral images and as follows:ISNR(R, T ) = SNR R, T\textbf{(11)}\par
= 10 log 10m i=1 n j=1 r2 ij m i=1 n j=1 (r ij ? tij ) 2 . (\textbf{12})\par
format for both images, which demonstrates the effectiveness of the proposed algorithm. Additionally, we examine the applicability of the proposed algorithm to natural images shown in Fig.  {\ref 8}, where Fig.  {\ref 8(a)} shows five pairs of natural images where the top row shows the first images A, and the second row shows the corresponding second ones B. Figures  {\ref 8(b), (c}) and  {\ref (d)} show the corresponding formatconverted images by GIF, the proposed ambigramic method without ED and Algorithm 1. Although, in Fig.  {\ref 8}(c), we can see false contours, they are removed in Fig.  {\ref 8(d)}.\par
The ISNR values for those images in Fig.  {\ref 8} are summarized in Table \hyperref[tab_1]{1}, where the proposed Algorithm 1 achieves higher values than the GIF images and ambigramic images without ED.  
\section[{Conclusions}]{Conclusions}\par
In this paper, we proposed an algorithm for formatting an ambigramic image file into which two images of the same size are recorded. If we read it forward direction, then we see the first image, on the other hand, if we read it backward direction, then we see the second one. We compared the proposed ambigramic image file format with the GIF format which has acquired a widespread use on the Web, and demonstrated that the proposed ambigramic images achieved higher quality than the GIF images based on an image quality measure. Experimental results showed that the proposed algorithm is also applicable to natural images. An Ambigramic Image File Format 
\section[{F}]{F}\par
We call this measure the integral image-based SNR (ISNR).\par
For the format-converted images in Fig. \hyperref[fig_8]{5}, their ISNRs are plotted in Fig. \hyperref[fig_10]{7}, where the vertical and horizontal axes denote the ISNR value and image name, respectively, and green, yellow and orange bars denote the file formats, GIF, ambigramic format without ED and the final ambigramic format by Algorithm 1, respectively. Algorithm 1 achieves higher ISNR values than GIF\begin{figure}[htbp]
\noindent\textbf{1}\includegraphics[]{image-2.png}
\caption{\label{fig_0}Figure 1 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{2}\includegraphics[]{image-3.png}
\caption{\label{fig_1}Figure 2 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{1}\includegraphics[]{image-4.png}
\caption{\label{fig_2}1 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-5.png}
\caption{\label{fig_3}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-6.png}
\caption{\label{fig_4}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3}\includegraphics[]{image-7.png}
\caption{\label{fig_5}Figure 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4}\includegraphics[]{image-8.png}
\caption{\label{fig_6}Figure 4 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-9.png}
\caption{\label{fig_7}F}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{5}\includegraphics[]{image-10.png}
\caption{\label{fig_8}Figure 5 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{6}\includegraphics[]{image-11.png}
\caption{\label{fig_9}Figure 6 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{7}\includegraphics[]{image-12.png}
\caption{\label{fig_10}Figure 7 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{1} \par 
\begin{longtable}{P{0.38520599250936327\textwidth}P{0.06367041198501873\textwidth}P{0.09550561797752809\textwidth}P{0.09550561797752809\textwidth}P{0.2101123595505618\textwidth}}
\multicolumn{5}{l}{Pair 1 Pair 2 Pair 3 Pair 4 Pair 5}\\
GIF image A\tabcellsep 49.97\tabcellsep 49.39\tabcellsep 46.80\tabcellsep 48.41 50.13\\
GIF image B\tabcellsep 46.51\tabcellsep 50.96\tabcellsep 46.26\tabcellsep 48.82 47.08\\
\multicolumn{2}{l}{A? without ED 38.05}\tabcellsep 46.97\tabcellsep 33.59\tabcellsep 47.34 45.28\\
\multicolumn{2}{l}{B? without ED 34.87}\tabcellsep 45.56\tabcellsep 35.46\tabcellsep 50.90 40.00\\
A? by Alg. 1\tabcellsep 73.93\tabcellsep 60.81\tabcellsep 82.48\tabcellsep 95.21 75.76\\
B? by Alg. 1\tabcellsep 63.61\tabcellsep 88.92\tabcellsep 53.09\tabcellsep 94.37 85.13\\
IV.\tabcellsep \tabcellsep \tabcellsep \tabcellsep \end{longtable} \par
 
\caption{\label{tab_1}Table 1 :}\end{figure}
 		 		\backmatter   			 
\subsection[{Acknowledgments}]{Acknowledgments}\par
This work was supported by JSPS KAKENHI Grant Number JP16H03019. 			  			  				\begin{bibitemlist}{1}
\bibitem[ Ambigramic images by Algorithm]{b10}\label{b10} 	 		\textit{},  	 	 		\textit{Ambigramic images by Algorithm}  		1.  	 
\bibitem[Wikipedia]{b0}\label{b0} 	 		\textit{Ambigram -Wikipedia, the free encyclopedia},  		 			Wikipedia 		.  		 \url{https://en.wikipedia.org/wiki/Ambigram,2020}  		 	 	 (Online; accessed 06-March-2020) 
\bibitem[Langdon (1996)]{b1}\label{b1} 	 		\textit{Ambigrams, logos, \& word art},  		 			John Langdon 		.  		 ac- cessed 07.  		 \url{http://www.johnlangdon.net/}  		1996. February-2019.  	 
\bibitem[Floyd and Steinberg ()]{b6}\label{b6} 	 		‘An Adaptive Al-gorithm for Spatial Greyscale’.  		 			Robert W Floyd 		,  		 			Louis Steinberg 		.  	 	 		\textit{Proceedings of the So-ciety for Information Display},  				 (the So-ciety for Information Display)  		1976. 17 p. .  	 
\bibitem[Daniel et al. ()]{b4}\label{b4} 	 		 			L Daniel 		,  		 			Gonzalo R Lau 		,  		 			Arce 		.  		\textit{Modern Digital Halftoning},  				 (Boca Ra-ton, FL, USA)  		2007. CRC Press, Inc.  	 	 (Second Edition) 
\bibitem[Wikipedia]{b3}\label{b3} 	 		\textit{GIF -Wikipedia, the free encyclopedia},  		 			Wikipedia 		.  		 \url{https://en.wikipedia.org/wiki/GIF,2020}  		 	 	 (Online; accessed 06-March-2020) 
\bibitem[Sakauchi et al. ()]{b5}\label{b5} 	 		‘Man-agement of the standard image database for image pro-cessing researches (sidba)’.  		 			M Sakauchi 		,  		 			Y Ohsawa 		,  		 			M Sone 		,  		 			M Onoe 		.  	 	 		\textit{ITEJ Technical Report}  		1984. 8  (38)  p. .  	 
\bibitem[Original images (b) GIF images (c) Ambigramic images without ED]{b9}\label{b9} 	 		\textit{Original images (b) GIF images (c) Ambigramic images without ED},  		 	 
\bibitem[Viola and Jones ()]{b7}\label{b7} 	 		‘Robust real-time object detection’.  		 			Paul Viola 		,  		 			Michael Jones 		.  	 	 		\textit{International Journal of Computer Vision}  		2002. 57  (2)  p. .  	 
\bibitem[Wikipedia ()]{b8}\label{b8} 	 		\textit{Signal-to-noise ratio -Wikipedia, the free encyclopedia},  		 			Wikipedia 		.  		 \url{https://en.wikipedia.org/wiki/Signal-to-noise\textunderscore ratio}  		2020.  	 	 (Online; accessed 06-March-2020) 
\bibitem[Langdon ()]{b2}\label{b2} 	 		\textit{Wordplay: The Philosophy, Art, and Science of Ambigrams},  		 			J Langdon 		.  		2005. Bantam.  	 
\end{bibitemlist}
 			 		 	 
\end{document}
