mirror of https://github.com/Askill/mosaik.git
replacements pics are getting loaded
TODO: find closest average fill array if not enough pics replace chunks of original
This commit is contained in:
parent
85aa1e45ae
commit
0fd0410de8
|
|
@ -2,6 +2,7 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="5d4ebe9a-78e7-4836-aff9-c6f6e8cd4a0d" name="Default" comment="">
|
<list default="true" id="5d4ebe9a-78e7-4836-aff9-c6f6e8cd4a0d" name="Default" comment="">
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/company/Main.java" afterPath="$PROJECT_DIR$/src/com/company/Main.java" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/company/Main.java" afterPath="$PROJECT_DIR$/src/com/company/Main.java" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/company/chunk.java" afterPath="$PROJECT_DIR$/src/com/company/chunk.java" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/company/chunk.java" afterPath="$PROJECT_DIR$/src/com/company/chunk.java" />
|
||||||
</list>
|
</list>
|
||||||
|
|
@ -18,24 +19,38 @@
|
||||||
<file leaf-file-name="Main.java" pinned="false" current-in-tab="true">
|
<file leaf-file-name="Main.java" pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/company/Main.java">
|
<entry file="file://$PROJECT_DIR$/src/com/company/Main.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="700">
|
<state relative-caret-position="533">
|
||||||
<caret line="35" column="9" lean-forward="true" selection-start-line="35" selection-start-column="9" selection-end-line="35" selection-end-column="9" />
|
<caret line="47" column="52" lean-forward="true" selection-start-line="47" selection-start-column="52" selection-end-line="47" selection-end-column="52" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2516#2524#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
|
<file leaf-file-name="collage.jpeg" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/collage.jpeg">
|
||||||
|
<provider selected="true" editor-type-id="images">
|
||||||
|
<state />
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
<file leaf-file-name="chunk.java" pinned="false" current-in-tab="false">
|
<file leaf-file-name="chunk.java" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="800">
|
<state relative-caret-position="1033">
|
||||||
<caret line="44" column="17" lean-forward="true" selection-start-line="44" selection-start-column="17" selection-end-line="44" selection-end-column="17" />
|
<caret line="59" column="10" lean-forward="false" selection-start-line="59" selection-start-column="10" selection-end-line="59" selection-end-column="10" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#324#325#0" expanded="true" />
|
<element signature="e#351#352#0" expanded="true" />
|
||||||
<element signature="e#354#355#0" expanded="true" />
|
<element signature="e#377#378#0" expanded="true" />
|
||||||
|
<element signature="e#421#422#0" expanded="true" />
|
||||||
|
<element signature="e#451#452#0" expanded="true" />
|
||||||
|
<element signature="e#484#485#0" expanded="true" />
|
||||||
|
<element signature="e#514#515#0" expanded="true" />
|
||||||
|
<element signature="e#558#559#0" expanded="true" />
|
||||||
|
<element signature="e#596#597#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
@ -181,11 +196,12 @@
|
||||||
<workItem from="1532439177316" duration="3253000" />
|
<workItem from="1532439177316" duration="3253000" />
|
||||||
<workItem from="1532606900745" duration="8000" />
|
<workItem from="1532606900745" duration="8000" />
|
||||||
<workItem from="1532607142184" duration="5258000" />
|
<workItem from="1532607142184" duration="5258000" />
|
||||||
|
<workItem from="1532686237561" duration="4814000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="9310000" />
|
<option name="totallyTimeSpent" value="14124000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TodoView">
|
<component name="TodoView">
|
||||||
<todo-panel id="selected-file">
|
<todo-panel id="selected-file">
|
||||||
|
|
@ -209,13 +225,12 @@
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33112246" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22258064" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22580644" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
|
|
@ -227,6 +242,7 @@
|
||||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959184" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
</layout>
|
</layout>
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
|
@ -246,18 +262,25 @@
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2516#2524#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="240">
|
<state relative-caret-position="720">
|
||||||
<caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" />
|
<caret line="44" column="17" lean-forward="true" selection-start-line="44" selection-start-column="17" selection-end-line="44" selection-end-column="17" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#324#325#0" expanded="true" />
|
<element signature="e#351#352#0" expanded="true" />
|
||||||
<element signature="e#354#355#0" expanded="true" />
|
<element signature="e#377#378#0" expanded="true" />
|
||||||
|
<element signature="e#421#422#0" expanded="true" />
|
||||||
|
<element signature="e#451#452#0" expanded="true" />
|
||||||
|
<element signature="e#484#485#0" expanded="true" />
|
||||||
|
<element signature="e#514#515#0" expanded="true" />
|
||||||
|
<element signature="e#558#559#0" expanded="true" />
|
||||||
|
<element signature="e#596#597#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
@ -268,6 +291,7 @@
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2516#2524#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
@ -278,8 +302,14 @@
|
||||||
<caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" />
|
<caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#324#325#0" expanded="true" />
|
<element signature="e#351#352#0" expanded="true" />
|
||||||
<element signature="e#354#355#0" expanded="true" />
|
<element signature="e#377#378#0" expanded="true" />
|
||||||
|
<element signature="e#421#422#0" expanded="true" />
|
||||||
|
<element signature="e#451#452#0" expanded="true" />
|
||||||
|
<element signature="e#484#485#0" expanded="true" />
|
||||||
|
<element signature="e#514#515#0" expanded="true" />
|
||||||
|
<element signature="e#558#559#0" expanded="true" />
|
||||||
|
<element signature="e#596#597#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
@ -290,6 +320,36 @@
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2516#2524#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="240">
|
||||||
|
<caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#351#352#0" expanded="true" />
|
||||||
|
<element signature="e#377#378#0" expanded="true" />
|
||||||
|
<element signature="e#421#422#0" expanded="true" />
|
||||||
|
<element signature="e#451#452#0" expanded="true" />
|
||||||
|
<element signature="e#484#485#0" expanded="true" />
|
||||||
|
<element signature="e#514#515#0" expanded="true" />
|
||||||
|
<element signature="e#558#559#0" expanded="true" />
|
||||||
|
<element signature="e#596#597#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/com/company/Main.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2516#2524#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
@ -301,22 +361,34 @@
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
<entry file="file://$PROJECT_DIR$/src/com/company/chunk.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="800">
|
<state relative-caret-position="1033">
|
||||||
<caret line="44" column="17" lean-forward="true" selection-start-line="44" selection-start-column="17" selection-end-line="44" selection-end-column="17" />
|
<caret line="59" column="10" lean-forward="false" selection-start-line="59" selection-start-column="10" selection-end-line="59" selection-end-column="10" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#324#325#0" expanded="true" />
|
<element signature="e#351#352#0" expanded="true" />
|
||||||
<element signature="e#354#355#0" expanded="true" />
|
<element signature="e#377#378#0" expanded="true" />
|
||||||
|
<element signature="e#421#422#0" expanded="true" />
|
||||||
|
<element signature="e#451#452#0" expanded="true" />
|
||||||
|
<element signature="e#484#485#0" expanded="true" />
|
||||||
|
<element signature="e#514#515#0" expanded="true" />
|
||||||
|
<element signature="e#558#559#0" expanded="true" />
|
||||||
|
<element signature="e#596#597#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/collage.jpeg">
|
||||||
|
<provider selected="true" editor-type-id="images">
|
||||||
|
<state />
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/company/Main.java">
|
<entry file="file://$PROJECT_DIR$/src/com/company/Main.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="700">
|
<state relative-caret-position="533">
|
||||||
<caret line="35" column="9" lean-forward="true" selection-start-line="35" selection-start-column="9" selection-end-line="35" selection-end-column="9" />
|
<caret line="47" column="52" lean-forward="true" selection-start-line="47" selection-start-column="52" selection-end-line="47" selection-end-column="52" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2516#2524#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
|
|
@ -3,38 +3,75 @@ import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
|
|
||||||
File file = new File("C:\\Users\\Elliot\\Desktop\\bear.jpeg");
|
File file = new File("C:\\Users\\Elliot\\Desktop\\bear.jpg");
|
||||||
FileInputStream fis = new FileInputStream(file);
|
FileInputStream fis = new FileInputStream(file);
|
||||||
BufferedImage image = ImageIO.read(fis); //reading the image file
|
BufferedImage image = ImageIO.read(fis); //reading the image file
|
||||||
|
|
||||||
int rows = 20;
|
ArrayList<String> repPaths = getAllImages(new File("C:\\Users\\Elliot\\Desktop\\test\\"));
|
||||||
int cols = 30;
|
|
||||||
int chunks = rows * cols;
|
int rows = 3;
|
||||||
|
int cols = 3;
|
||||||
|
|
||||||
int chunkWidth = image.getWidth() / cols; // determines the chunk width and height
|
int chunkWidth = image.getWidth() / cols; // determines the chunk width and height
|
||||||
int chunkHeight = image.getHeight() / rows;
|
int chunkHeight = image.getHeight() / rows;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
chunk[] imgs = new chunk[chunks];
|
|
||||||
|
chunk[] chunks = new chunk[rows * cols];
|
||||||
|
chunk[] replacements = new chunk[rows * cols];
|
||||||
|
|
||||||
for (int x = 0; x < rows; x++) {
|
for (int x = 0; x < rows; x++) {
|
||||||
for (int y = 0; y < cols; y++) {
|
for (int y = 0; y < cols; y++) {
|
||||||
//Initialize the image array with image chunks
|
//Initialize the image array with image chunks
|
||||||
BufferedImage tempimg = new BufferedImage(chunkWidth, chunkHeight, image.getType());
|
BufferedImage tempimg = new BufferedImage(chunkWidth, chunkHeight, image.getType());
|
||||||
imgs[count] = new chunk(tempimg);
|
chunks[count] = new chunk(tempimg);
|
||||||
imgs[count].average();
|
|
||||||
|
|
||||||
|
|
||||||
// draws the image chunk
|
// draws the image chunk
|
||||||
Graphics2D gr = imgs[count++].getImg().createGraphics();
|
Graphics2D gr = chunks[count++].getImg().createGraphics();
|
||||||
gr.drawImage(image, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);
|
gr.drawImage(image, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);
|
||||||
gr.dispose();
|
gr.dispose();
|
||||||
|
|
||||||
|
chunks[count-1].average();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImageIO.write(imgs[2].getImg(), "jpg", new File("collage.jpg"));
|
|
||||||
|
for (int i = 0; i < cols; i++) {
|
||||||
|
// read file from path
|
||||||
|
File tempfile = new File(repPaths.get(i));
|
||||||
|
FileInputStream tempfis = new FileInputStream(tempfile);
|
||||||
|
|
||||||
|
// fill array of chunks with read images
|
||||||
|
BufferedImage tempimg = ImageIO.read(tempfis);
|
||||||
|
replacements[i] = new chunk(tempimg);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageIO.write(chunks[8].getImg(), "jpeg", new File("collage.jpeg"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all jpg images from a directory in an array.
|
||||||
|
* Source: http://www.java2s.com/Code/Java/2D-Graphics-GUI/Returnsalljpgimagesfromadirectoryinanarray.htm
|
||||||
|
* @param directory the directory to start with
|
||||||
|
* @return an ArrayList<String> containing all the file paths or nul if none are found..
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public static ArrayList<String> getAllImages(File directory) throws IOException {
|
||||||
|
ArrayList<String> resultList = new ArrayList<String>(256);
|
||||||
|
File[] f = directory.listFiles();
|
||||||
|
for (File file : f) {
|
||||||
|
if (file != null && file.getName().toLowerCase().endsWith(".jpg")) {
|
||||||
|
resultList.add(file.getCanonicalPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (resultList.size() > 0)
|
||||||
|
return resultList;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,23 +3,40 @@ package com.company;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
public class chunk {
|
public class chunk {
|
||||||
|
|
||||||
|
|
||||||
private BufferedImage img;
|
private BufferedImage img;
|
||||||
|
private int[] average;
|
||||||
|
|
||||||
chunk(BufferedImage Img){
|
chunk(BufferedImage Img){
|
||||||
this.img = Img;
|
this.img = Img;
|
||||||
|
this.average = this.average();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GETTER AND SETTER
|
||||||
|
*/
|
||||||
public BufferedImage getImg() {
|
public BufferedImage getImg() {
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
public void setImg(BufferedImage img) {
|
public void setImg(BufferedImage img) {
|
||||||
this.img = img;
|
this.img = img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getAverage() {
|
||||||
|
return average;
|
||||||
|
}
|
||||||
|
public void setAverage(int[] average) {
|
||||||
|
this.average = average;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* OTHER METHODS
|
||||||
|
*/
|
||||||
public int[] average(){
|
public int[] average(){
|
||||||
int r = 0, g = 0, b = 0, a = 0, x= 0, y = 0;
|
int r = 0, g = 0, b = 0, a = 0, x= 0, y = 0, pc = 0;
|
||||||
|
|
||||||
for(; y < this.img.getHeight(); y++){
|
for(; y < this.img.getHeight(); y++){
|
||||||
for(; x < this.img.getWidth(); x++){
|
for(; x < this.img.getWidth(); x++){
|
||||||
|
|
@ -27,27 +44,21 @@ public class chunk {
|
||||||
//get pixel value
|
//get pixel value
|
||||||
int p = this.img.getRGB(x,y);
|
int p = this.img.getRGB(x,y);
|
||||||
|
|
||||||
//get alpha
|
a += (p>>24) & 0xff;
|
||||||
a = (p>>24) & 0xff;
|
r += (p>>16) & 0xff;
|
||||||
|
g += (p>>8) & 0xff;
|
||||||
//get red
|
b += p & 0xff;
|
||||||
r = (p>>16) & 0xff;
|
pc++;
|
||||||
|
|
||||||
//get green
|
|
||||||
g = (p>>8) & 0xff;
|
|
||||||
|
|
||||||
//get blue
|
|
||||||
a = p & 0xff;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r /= x*y;
|
r /= pc;
|
||||||
g /= x*y;
|
g /= pc;
|
||||||
b /= x*y;
|
b /= pc;
|
||||||
a /= x*y;
|
a /= pc;
|
||||||
|
|
||||||
System.out.println(r + " , " + g + " , " + b + " , " + a);
|
//System.out.println(r + " , " + g + " , " + b + " , " + a);
|
||||||
return new int[]{r,g,b};
|
return new int[]{r,g,b,a};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue