Skip to content

Commit

Permalink
smaller images
Browse files Browse the repository at this point in the history
  • Loading branch information
schacon committed Oct 29, 2014
1 parent f62bf2e commit 3de8ef2
Show file tree
Hide file tree
Showing 183 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ progit.pdfmarks
progit.epub
progit-kf8.epub
progit.mobi
images/
/images/
Binary file modified book/01-introduction/images/areas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/01-introduction/images/centralized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/01-introduction/images/deltas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/01-introduction/images/distributed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/01-introduction/images/git-osx-installer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/01-introduction/images/local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/01-introduction/images/snapshots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/02-git-basics/images/lifecycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/advance-master.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/advance-testing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-branching-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-branching-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-branching-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-branching-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-branching-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-branching-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-merging-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-merging-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-rebase-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-rebase-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-rebase-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/basic-rebase-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/branch-and-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/checkout-master.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/commit-and-tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/03-git-branching/images/commits-and-parents.png
Binary file modified book/03-git-branching/images/head-to-master.png
Binary file modified book/03-git-branching/images/head-to-testing.png
Binary file modified book/03-git-branching/images/interesting-rebase-1.png
Binary file modified book/03-git-branching/images/interesting-rebase-2.png
Binary file modified book/03-git-branching/images/interesting-rebase-3.png
Binary file modified book/03-git-branching/images/interesting-rebase-4.png
Binary file modified book/03-git-branching/images/interesting-rebase-5.png
Binary file modified book/03-git-branching/images/lr-branches-1.png
Binary file modified book/03-git-branching/images/lr-branches-2.png
Binary file modified book/03-git-branching/images/perils-of-rebasing-1.png
Binary file modified book/03-git-branching/images/perils-of-rebasing-2.png
Binary file modified book/03-git-branching/images/perils-of-rebasing-3.png
Binary file modified book/03-git-branching/images/perils-of-rebasing-4.png
Binary file modified book/03-git-branching/images/perils-of-rebasing-5.png
Binary file modified book/03-git-branching/images/remote-branches-1.png
Binary file modified book/03-git-branching/images/remote-branches-2.png
Binary file modified book/03-git-branching/images/remote-branches-3.png
Binary file modified book/03-git-branching/images/remote-branches-4.png
Binary file modified book/03-git-branching/images/remote-branches-5.png
Binary file modified book/03-git-branching/images/topic-branches-1.png
Binary file modified book/03-git-branching/images/topic-branches-2.png
Binary file modified book/03-git-branching/images/two-branches.png
Binary file modified book/04-git-server/images/git-instaweb.png
Binary file modified book/04-git-server/images/gitlab-broadcast.png
Binary file modified book/04-git-server/images/gitlab-groups.png
Binary file modified book/04-git-server/images/gitlab-users.png
Binary file modified book/05-distributed-git/images/benevolent-dictator.png
Binary file modified book/05-distributed-git/images/centralized.png
Binary file modified book/05-distributed-git/images/git-diff-check.png
Binary file modified book/05-distributed-git/images/integration-manager.png
Binary file modified book/05-distributed-git/images/large-merges-1.png
Binary file modified book/05-distributed-git/images/large-merges-2.png
Binary file modified book/05-distributed-git/images/managed-team-1.png
Binary file modified book/05-distributed-git/images/managed-team-2.png
Binary file modified book/05-distributed-git/images/managed-team-3.png
Binary file modified book/05-distributed-git/images/managed-team-flow.png
Binary file modified book/05-distributed-git/images/merging-workflows-1.png
Binary file modified book/05-distributed-git/images/merging-workflows-2.png
Binary file modified book/05-distributed-git/images/merging-workflows-3.png
Binary file modified book/05-distributed-git/images/merging-workflows-4.png
Binary file modified book/05-distributed-git/images/merging-workflows-5.png
Binary file modified book/05-distributed-git/images/public-small-1.png
Binary file modified book/05-distributed-git/images/public-small-2.png
Binary file modified book/05-distributed-git/images/public-small-3.png
Binary file modified book/05-distributed-git/images/rebasing-1.png
Binary file modified book/05-distributed-git/images/rebasing-2.png
Binary file modified book/05-distributed-git/images/small-team-1.png
Binary file modified book/05-distributed-git/images/small-team-2.png
Binary file modified book/05-distributed-git/images/small-team-3.png
Binary file modified book/05-distributed-git/images/small-team-4.png
Binary file modified book/05-distributed-git/images/small-team-5.png
Binary file modified book/05-distributed-git/images/small-team-6.png
Binary file modified book/05-distributed-git/images/small-team-7.png
Binary file modified book/05-distributed-git/images/small-team-flow.png
Binary file modified book/06-github/images/2fa-1.png
Binary file modified book/06-github/images/account-settings.png
Binary file modified book/06-github/images/avatar-crop.png
Binary file modified book/06-github/images/blink-01-start.png
Binary file modified book/06-github/images/blink-02-pr.png
Binary file modified book/06-github/images/blink-03-pull-request-open.png
Binary file modified book/06-github/images/blink-04-email.png
Binary file modified book/06-github/images/blink-04-pr-comment.png
Binary file modified book/06-github/images/blink-05-general-comment.png
Binary file modified book/06-github/images/blink-06-final.png
Binary file modified book/06-github/images/blink-pull-request-open.png
Binary file modified book/06-github/images/collaborators.png
Binary file modified book/06-github/images/email-settings.png
Binary file modified book/06-github/images/hubot.png
Binary file modified book/06-github/images/maint-01-email.png
Binary file modified book/06-github/images/maint-02-merge.png
Binary file modified book/06-github/images/maint-03-email-resp.png
Binary file modified book/06-github/images/maint-04-target.png
Binary file modified book/06-github/images/maint-05-mentions.png
Binary file modified book/06-github/images/maint-07-notifications.png
Binary file modified book/06-github/images/maint-08-notifications-page.png
Binary file modified book/06-github/images/maint-09-contrib.png
Binary file modified book/06-github/images/maint-10-default-branch.png
Binary file modified book/06-github/images/maint-11-transfer.png
Binary file modified book/06-github/images/markdown-01-example.png
Binary file modified book/06-github/images/markdown-02-tasks.png
Binary file modified book/06-github/images/markdown-03-task-summary.png
Binary file modified book/06-github/images/markdown-04-fenced-code.png
Binary file modified book/06-github/images/markdown-05-quote.png
Binary file modified book/06-github/images/markdown-06-emoji-complete.png
Binary file modified book/06-github/images/markdown-07-emoji.png
Binary file modified book/06-github/images/markdown-08-drag-drop.png
Binary file modified book/06-github/images/mentions-01-syntax.png
Binary file modified book/06-github/images/mentions-02-render.png
Binary file modified book/06-github/images/mentions-03-closed.png
Binary file modified book/06-github/images/new-repo.png
Binary file modified book/06-github/images/newrepoform.png
Binary file modified book/06-github/images/notifications.png
Binary file modified book/06-github/images/orgs-01-page.png
Binary file modified book/06-github/images/orgs-02-teams.png
Binary file modified book/06-github/images/orgs-03-audit.png
Binary file modified book/06-github/images/pr-01-fail.png
Binary file modified book/06-github/images/pr-02-merge-fix.png
Binary file modified book/06-github/images/reposettingslink.png
Binary file modified book/06-github/images/scripting-01-services.png
Binary file modified book/06-github/images/scripting-02-email-service.png
Binary file modified book/06-github/images/scripting-03-webhook.png
Binary file modified book/06-github/images/scripting-04-webhook-debug.png
Binary file modified book/06-github/images/scripting-05-access-token.png
Binary file modified book/06-github/images/scripting-06-comment.png
Binary file modified book/06-github/images/scripting-07-status.png
Binary file modified book/06-github/images/ssh-keys.png
Binary file modified book/06-github/images/your-profile.png
Binary file modified book/07-git-tools/images/double-dot.png
Binary file modified book/07-git-tools/images/replace1.png
Binary file modified book/07-git-tools/images/replace2.png
Binary file modified book/07-git-tools/images/replace3.png
Binary file modified book/07-git-tools/images/replace4.png
Binary file modified book/07-git-tools/images/replace5.png
Binary file modified book/07-git-tools/images/rerere1.png
Binary file modified book/07-git-tools/images/rerere2.png
Binary file modified book/07-git-tools/images/rerere3.png
Binary file modified book/07-git-tools/images/reset-checkout.png
Binary file modified book/07-git-tools/images/reset-ex1.png
Binary file modified book/07-git-tools/images/reset-ex2.png
Binary file modified book/07-git-tools/images/reset-ex3.png
Binary file modified book/07-git-tools/images/reset-ex4.png
Binary file modified book/07-git-tools/images/reset-ex5.png
Binary file modified book/07-git-tools/images/reset-ex6.png
Binary file modified book/07-git-tools/images/reset-hard.png
Binary file modified book/07-git-tools/images/reset-mixed.png
Binary file modified book/07-git-tools/images/reset-path1.png
Binary file modified book/07-git-tools/images/reset-path2.png
Binary file modified book/07-git-tools/images/reset-path3.png
Binary file modified book/07-git-tools/images/reset-soft.png
Binary file modified book/07-git-tools/images/reset-squash-r1.png
Binary file modified book/07-git-tools/images/reset-squash-r2.png
Binary file modified book/07-git-tools/images/reset-squash-r3.png
Binary file modified book/07-git-tools/images/reset-start.png
Binary file modified book/07-git-tools/images/reset-workflow.png
Binary file modified book/07-git-tools/images/undomerge-reset.png
Binary file modified book/07-git-tools/images/undomerge-revert.png
Binary file modified book/07-git-tools/images/undomerge-revert2.png
Binary file modified book/07-git-tools/images/undomerge-revert3.png
Binary file modified book/07-git-tools/images/undomerge-start.png
Binary file modified book/08-customizing-git/images/clean.png
Binary file modified book/08-customizing-git/images/smudge.png
Binary file modified book/09-git-and-other-scms/images/git-fusion-boot.png
Binary file modified book/09-git-and-other-scms/images/git-fusion-perforce-graph.png
Binary file modified book/09-git-and-other-scms/images/git-tfs-ct.png
Binary file modified book/10-git-internals/images/data-model-1.png
Binary file modified book/10-git-internals/images/data-model-2.png
Binary file modified book/10-git-internals/images/data-model-3.png
Binary file modified book/10-git-internals/images/data-model-4.png
Binary file modified book/A-git-in-other-environments/images/egit.png
Binary file modified book/A-git-in-other-environments/images/git-gui.png
Binary file modified book/A-git-in-other-environments/images/github_mac.png
Binary file modified book/A-git-in-other-environments/images/github_win.png
Binary file modified book/A-git-in-other-environments/images/gitk.png
Binary file modified book/A-git-in-other-environments/images/zsh-prompt.png
Binary file modified book/cover.png
29 changes: 29 additions & 0 deletions crush.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#! /usr/bin/env ruby
require 'rubygems'
require 'oily_png'

Dir.glob("book/**/*.png").each do |file|
puts file
image = ChunkyPNG::Image.from_file(file)
p image.width
p image.height
if image.width > 800 || image.height > 800
if image.width > image.height
`convert -resize 800x #{file} #{file}.smaller.png`
else
`convert -resize x800 #{file} #{file}.smaller.png`
end
`pngcrush #{file}.smaller.png #{file}`
`rm #{file}.smaller.png`
end
end


# [2,0.5].each do |scale|
# resized_image = ChunkyPNG::Image.new((image.width * scale).round, (image.height * scale).round)
# resized_image.pixels.map!.with_index do |pixel, index|
# x, y = index % resized_image.width, (index / resized_image.width).floor
# image[x / scale, y / scale]
# end
# resized_image.save("bassie_resized_#{scale}.png")
# end

0 comments on commit 3de8ef2

Please sign in to comment.