Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gifitti
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nick Kozel
Gifitti
Commits
666bd24e
Commit
666bd24e
authored
8 years ago
by
Pavle Arezina
Browse files
Options
Downloads
Patches
Plain Diff
Playback work, still not done
parent
a167d103
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Gifitti/Gifitti/Transformation/TransformGif.cs
+17
-0
17 additions, 0 deletions
src/Gifitti/Gifitti/Transformation/TransformGif.cs
src/Gifitti/Gifitti/View_Models/MainForm.cs
+7
-2
7 additions, 2 deletions
src/Gifitti/Gifitti/View_Models/MainForm.cs
with
24 additions
and
2 deletions
src/Gifitti/Gifitti/Transformation/TransformGif.cs
+
17
−
0
View file @
666bd24e
...
...
@@ -27,10 +27,27 @@ namespace Gifitti.Transformation
for
(
int
i
=
0
;
i
<
gm
.
numberOfFrames
;
i
++)
{
collection
.
Add
(
new
MagickImage
(
gm
.
GetFrame
(
i
)
as
Bitmap
));
//collection[i].AnimationDelay = (delay / 8);
collection
[
i
].
Resize
(
newWidth
,
newHeight
);
gm
.
SetFrameFromImage
(
collection
[
i
].
ToBitmap
(),
i
);
}
}
}
public
static
void
saveThePlayback
(
GifModel
gm
,
int
delay
)
{
using
(
MagickImageCollection
collection
=
new
MagickImageCollection
())
{
for
(
int
i
=
0
;
i
<
gm
.
numberOfFrames
;
i
++)
{
collection
.
Add
(
new
MagickImage
(
gm
.
GetFrame
(
i
)
as
Bitmap
));
collection
[
i
].
AnimationDelay
=
(
delay
/
10
);
}
//return collection;
collection
.
Write
(
"Test.Animated.gif"
);
}
}
}
}
This diff is collapsed.
Click to expand it.
src/Gifitti/Gifitti/View_Models/MainForm.cs
+
7
−
2
View file @
666bd24e
...
...
@@ -11,6 +11,8 @@ using System.Threading.Tasks;
using
System.Windows.Forms
;
using
Gifitti.Models
;
using
System.Threading
;
using
Gifitti.Transformation
;
using
ImageMagick
;
namespace
Gifitti.View_Models
{
...
...
@@ -207,13 +209,13 @@ namespace Gifitti.View_Models
/// <param name="e"> Event arguments associated with this event. </param>
private
void
MenuItemFileSaveAs
(
object
sender
,
EventArgs
e
)
{
if
(!
chkImage
())
TransformGif
.
saveThePlayback
(
gm
,
delay
);
/*if (!chkImage())
return;
String path = null;
saveGifFileDialog.Filter = "GIF Files|*.gif";
if (saveGifFileDialog.ShowDialog() == DialogResult.OK)
path = saveGifFileDialog.FileName;
//Handel Close
if (path == null)
return;
...
...
@@ -225,6 +227,7 @@ namespace Gifitti.View_Models
{
MessageBox.Show("Save Path Invalid!");
}
*/
}
#
endregion
...
...
@@ -327,5 +330,7 @@ namespace Gifitti.View_Models
{
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment