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
b1391a9c
Commit
b1391a9c
authored
8 years ago
by
Riley Mcgee
Browse files
Options
Downloads
Patches
Plain Diff
Delay to saves
parent
a5b8e2f3
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/Models/GifModel.cs
+6
-1
6 additions, 1 deletion
src/Gifitti/Gifitti/Models/GifModel.cs
src/Gifitti/Gifitti/View_Models/MainForm.cs
+2
-3
2 additions, 3 deletions
src/Gifitti/Gifitti/View_Models/MainForm.cs
with
8 additions
and
4 deletions
src/Gifitti/Gifitti/Models/GifModel.cs
+
6
−
1
View file @
b1391a9c
...
...
@@ -26,6 +26,7 @@ namespace Gifitti.Models
private
bool
reverse
;
public
int
startFrame
=
0
;
public
int
endFrame
=
0
;
public
int
delay
{
get
;
set
;
}
=
0
;
/// <summary>
/// Load a GIF into the software model from the system path "path"
...
...
@@ -94,7 +95,11 @@ namespace Gifitti.Models
using
(
MagickImageCollection
collection
=
new
MagickImageCollection
())
{
for
(
int
i
=
this
.
startFrame
;
i
<
Math
.
Min
(
this
.
endFrame
,
frames
.
Length
);
i
++)
{
collection
.
Add
(
new
MagickImage
(
frames
[
i
]
as
Bitmap
));
collection
[
i
-
this
.
startFrame
].
AnimationDelay
=
this
.
delay
/
10
;
}
// Maximize Colour saturation
QuantizeSettings
settings
=
new
QuantizeSettings
();
...
...
@@ -123,7 +128,7 @@ namespace Gifitti.Models
for
(
int
i
=
start
;
i
<
stop
;
i
++)
{
collection
.
Add
(
new
ImageMagick
.
MagickImage
(
frames
[
i
]
as
Bitmap
));
collection
[
i
-
start
].
AnimationDelay
=
1
;
collection
[
i
-
this
.
startFrame
].
AnimationDelay
=
this
.
delay
/
10
;
}
// Optionally reduce colors
QuantizeSettings
settings
=
new
QuantizeSettings
();
...
...
This diff is collapsed.
Click to expand it.
src/Gifitti/Gifitti/View_Models/MainForm.cs
+
2
−
3
View file @
b1391a9c
...
...
@@ -25,7 +25,6 @@ namespace Gifitti.View_Models
{
#
region
Fields
GifModel
gm
;
int
delay
=
0
;
// GifImage _currentGif; <- used to encapsulate info later
private
const
int
widthBuffer
=
20
;
...
...
@@ -167,7 +166,7 @@ namespace Gifitti.View_Models
private
void
AdvanceFrameTimer
(
object
sender
,
EventArgs
e
)
{
//get next frame
Thread
.
Sleep
(
delay
);
Thread
.
Sleep
(
gm
.
delay
);
gifView
.
Image
=
gm
.
GetNextFrame
();
}
...
...
@@ -313,7 +312,7 @@ namespace Gifitti.View_Models
/// <param name="e"> Event arguments associated with this event. </param>
private
void
GifFPSSliderUpdate
(
object
sender
,
EventArgs
e
)
{
delay
=
(
10
-
trackBar1
.
Value
)*
10
;
gm
.
delay
=
(
10
-
trackBar1
.
Value
)*
10
;
}
private
void
MenuItemResize
(
object
sender
,
EventArgs
e
)
...
...
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