DevIL.nb 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. (* Content-type: application/mathematica *)
  2. (*** Wolfram Notebook File ***)
  3. (* http://www.wolfram.com/nb *)
  4. (* CreatedBy='Mathematica 6.0' *)
  5. (*CacheID: 234*)
  6. (* Internal cache information:
  7. NotebookFileLineBreakTest
  8. NotebookFileLineBreakTest
  9. NotebookDataPosition[ 145, 7]
  10. NotebookDataLength[ 4305, 133]
  11. NotebookOptionsPosition[ 3741, 109]
  12. NotebookOutlinePosition[ 4105, 125]
  13. CellTagsIndexPosition[ 4062, 122]
  14. WindowFrame->Normal
  15. ContainsDynamic->False*)
  16. (* Beginning of Notebook Content *)
  17. Notebook[{
  18. Cell[BoxData[
  19. RowBox[{"link", " ", "=", " ",
  20. RowBox[{
  21. "Install", "[", "\"\<E:\\DevIL\\projects\\Mathematica\\devil.exe\>\"",
  22. "]"}]}]], "Input",
  23. CellChangeTimes->{{3.44382235517484*^9, 3.4438223572684565`*^9}}],
  24. Cell[BoxData[
  25. RowBox[{
  26. RowBox[{
  27. "Imagename", " ", "=", " ",
  28. "\"\<E:\\DevIL\\projects\\Mathematica\\rgb32.tga\>\""}], ";"}]], "Input",
  29. CellChangeTimes->{{3.433336425992341*^9, 3.433336437270916*^9}, {
  30. 3.433336500650648*^9, 3.4333365039531717`*^9}, {3.433336644044791*^9,
  31. 3.433336644308446*^9}, {3.43333691883775*^9, 3.4333369191961255`*^9}, {
  32. 3.4438223711542864`*^9, 3.4438223802972555`*^9}, {3.4438224311895065`*^9,
  33. 3.443822433804573*^9}}],
  34. Cell[CellGroupData[{
  35. Cell[BoxData[
  36. RowBox[{
  37. RowBox[{"If", "[",
  38. RowBox[{
  39. RowBox[{
  40. RowBox[{"mlLoad", "[", "Imagename", "]"}], "\[Equal]", "1"}], ",",
  41. "\[IndentingNewLine]",
  42. RowBox[{"(",
  43. RowBox[{
  44. RowBox[{"width", " ", "=", " ",
  45. RowBox[{"mlWidth", "[", "1", "]"}]}], ";", "\[IndentingNewLine]",
  46. RowBox[{"height", "=",
  47. RowBox[{"mlHeight", "[", "1", "]"}]}], ";", "\[IndentingNewLine]",
  48. RowBox[{"data", " ", "=", " ",
  49. RowBox[{"mlData", "[", "1", "]"}]}], ";", "\[IndentingNewLine]",
  50. RowBox[{"r", " ", "=", " ",
  51. RowBox[{"Table", "[",
  52. RowBox[{
  53. RowBox[{"Table", "[",
  54. RowBox[{
  55. RowBox[{"Table", "[",
  56. RowBox[{
  57. RowBox[{"data", "[",
  58. RowBox[{"[",
  59. RowBox[{
  60. RowBox[{"y", " ", "*", " ", "width", " ", "*", " ", "4"}],
  61. " ", "+", " ",
  62. RowBox[{"x", "*", "4"}], " ", "+", " ", "c"}], "]"}], "]"}],
  63. ",",
  64. RowBox[{"{",
  65. RowBox[{"c", ",", "4"}], "}"}]}], "]"}], ",",
  66. RowBox[{"{",
  67. RowBox[{"x", ",", "0", ",",
  68. RowBox[{"width", "-", "1"}]}], "}"}]}], "]"}], ",",
  69. RowBox[{"{",
  70. RowBox[{"y", ",", "0", ",",
  71. RowBox[{"height", "-", "1"}]}], "}"}]}], "]"}]}], ";",
  72. "\[IndentingNewLine]",
  73. RowBox[{"image", " ", "=",
  74. RowBox[{"Graphics", "[",
  75. RowBox[{"Raster", "[", "r", "]"}], "]"}]}]}], ")"}], ",",
  76. "\[IndentingNewLine]",
  77. RowBox[{"Print", "[", "\"\<Could not load image.\>\"", "]"}]}], "]"}],
  78. ";"}]], "Input",
  79. CellChangeTimes->{{3.433336299124484*^9, 3.433336308652195*^9}, {
  80. 3.433336340650147*^9, 3.4333364425606165`*^9}, {3.4333365088102827`*^9,
  81. 3.4333365154026337`*^9}, {3.433336600067137*^9, 3.4333366264160366`*^9},
  82. 3.4333370439234943`*^9}],
  83. Cell[BoxData["\<\"Could not load image.\"\>"], "Print",
  84. CellChangeTimes->{3.4438224626357355`*^9, 3.443822636813064*^9}]
  85. }, Open ]],
  86. Cell[BoxData[
  87. RowBox[{"Show", "[", "image", "]"}]], "Input",
  88. CellChangeTimes->{{3.4333366309743385`*^9, 3.4333366324136996`*^9}}],
  89. Cell[CellGroupData[{
  90. Cell[BoxData[
  91. RowBox[{"Uninstall", "[", "link", "]"}]], "Input"],
  92. Cell[BoxData["\<\"\\\"E:\\\\DevIL\\\\projects\\\\Mathematica\\\\devil.exe\\\"\
  93. \"\>"], "Output",
  94. CellChangeTimes->{3.4438224816530733`*^9, 3.4438226422609577`*^9,
  95. 3.4438227036476536`*^9}]
  96. }, Open ]]
  97. },
  98. WindowSize->{1161, 898},
  99. WindowMargins->{{54, Automatic}, {Automatic, -1}},
  100. ShowSelection->True,
  101. FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (April 28, 2007)",
  102. StyleDefinitions->"Default.nb"
  103. ]
  104. (* End of Notebook Content *)
  105. (* Internal cache information *)
  106. (*CellTagsOutline
  107. CellTagsIndex->{}
  108. *)
  109. (*CellTagsIndex
  110. CellTagsIndex->{}
  111. *)
  112. (*NotebookFileOutline
  113. Notebook[{
  114. Cell[568, 21, 220, 5, 31, "Input"],
  115. Cell[791, 28, 459, 9, 31, "Input"],
  116. Cell[CellGroupData[{
  117. Cell[1275, 41, 1896, 47, 152, "Input"],
  118. Cell[3174, 90, 121, 1, 23, "Print"]
  119. }, Open ]],
  120. Cell[3310, 94, 131, 2, 31, "Input"],
  121. Cell[CellGroupData[{
  122. Cell[3466, 100, 65, 1, 31, "Input"],
  123. Cell[3534, 103, 191, 3, 30, "Output"]
  124. }, Open ]]
  125. }
  126. ]
  127. *)
  128. (* End of internal cache information *)