{ "cells": [ { "cell_type": "markdown", "id": "34fe6b8c", "metadata": {}, "source": [ "# imgconv\n", "Open rose512.jpg and save it in the following formats:\n", " .png, .gif, .xpm and tiff.\n", "\n", "\n", "\n", "\n", "**Author:** Valeriy Onuchin \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:38 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "490f17a9", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:38:45.532506Z", "iopub.status.busy": "2026-05-19T20:38:45.532393Z", "iopub.status.idle": "2026-05-19T20:38:46.089390Z", "shell.execute_reply": "2026-05-19T20:38:46.088925Z" } }, "outputs": [], "source": [ "TImage *img = TImage::Open(\"$ROOTSYS/tutorials/visualisation/image/rose512.jpg\");\n", "if (!img) {\n", " printf(\"Could not create an image... exit\\n\");\n", " return;\n", "}\n", "\n", "img->WriteImage(\"rose512.png\");\n", "img->WriteImage(\"rose512.gif\");\n", "img->WriteImage(\"rose512.xpm\");\n", "img->WriteImage(\"rose512.tiff\");" ] } ], "metadata": { "kernelspec": { "display_name": "ROOT C++", "language": "c++", "name": "root" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".C", "mimetype": " text/x-c++src", "name": "c++" } }, "nbformat": 4, "nbformat_minor": 5 }