Need help to resize your images so that they all take up less than 50 K of disc space.
To resize an image using MS Notepad:
Select Main Menu Resize >> In the Resize box
Leave Percentage radio button selected >>
Enter 50 and 50 in the Horizontal and Vertical text boxes
to reduce the width and height of the image by 50%.
Click OK.
Right click on the image and select Properties to see the new image size. Continue to reduce the image disc size until it is less than 50 K.
To resize an image on a Mac: Right-click (or Ctrl-click) on the file in Finder and select Services >> Resize Image from the contextual dropdown menu. You can also drag a selection box over several images and resize them all at once using the service.
Here is pseudocode that you can use:
Import os and shutil modules.
Assign previous_album to the empty string ("").
Open index file, call the file object fin.
Read first line of input file.
While input file not empty,
Use split to obtain fields.
Assign zeroth field to folder_name.
Assign first field to original_photo_name
If previous_album != folder_name
Use os.mkdir to create new folder named folder_name.
Initialize counter to 1.
Assign folder_name to previous_album
End.
# Next two lines are literal Python statements.
new_photo_name = "{:s}/{:03d}-{:s}". \
format(folder_name, counter, original_photo_name)
Use shutil.copy method to copy "originals/" + original_photo_name
to new_photo_name.
Add one to counter.
Read next line of input file.
End.
In python language
I follow this statement to code:[Your script should read an index file, create a new folder for each album, then rename and copy the image files into the album folders.]
import os
from shutil import copyfile
#Code Author:siddhinath kharade,9/3/19
def CopySrcDst(data):
previous_folder, counter="",0
for line in data:
folder_name =
line[0]
file_name =
line[1]
if
previous_folder!=folder_name:
os.mkdir(folder_name)
previous_folder = folder_name
counter=1
new_photo_name =
folder_name + str(counter) + file_name
copyfile(file_name,
new_photo_name)
counter+=1
def main(index_file):
#index file contains formatted text like
[folder-name pic_name] on each lines
data=[]
with open(index_file) as fp:
lines =
fp.readlines()
data = list(map(lambda l: l.strip().split("
"),lines))
CopySrcDst(data)
main("index.txt")
# Make sure about indentation
#index.txt file i considered
/home/dataeaze/Documents/send1/ /home/dataeaze/Documents/send/
20181012125229_IMG_0346.JPG
/hoeme/dataeaze/Documents/send1/
/home/dataeaze/Documents/send/20181012125701_IMG_0358.JPG
/home/dataeaze/Documents/send1/
/home/dataeaze/Documents/send/20181012130558_IMG_0392.JPG
/home/dataeaze/Documents/send1/
/home/dataeaze/Documents/send/20181012183436_IMG_0417.JPG
/home/dataeaze/Documents/send1/
/home/dataeaze/Documents/send/20181102135519_IMG_0652.JPG
# IF YOU HAVE ANY PROBLEM WITH THIS CODE ANY CONCERN THEN mail me i will definetly solve your issue
Again i was not getting completly your point about the algorithm that copy each file into single folder or copt each albumb into each folder if anu issues mail me i can resolve or recode this code
mail: kharadesiddhinath this is google mail address you can attach at-th-rate [ i cant write complete email address]
Need help to resize your images so that they all take up less than 50 K...
Hey I really need some help asap!!!! I have to take the node class that is in my ziplist file class and give it it's own file. My project has to have 4 file classes but have 3. The Node class is currently in the ziplist file. I need it to be in it's own file, but I am stuck on how to do this. I also need a uml diagram lab report explaining how I tested my code input...
you need to use javafx for following problem
these instructions is for JavaFX program so you need
to follow the instructions and according to images you have design
the GUI
Write a program to design the following interface and use event handling and File 10 to perform the given operation. Make sure you have a background image and different color for labels and buttons for this interface. Input Information Course Quiz Grade Assignment Grade Fal Grade Submit View Grade Info...
could you please help me with this problem, also I
need a little text so I can understand how you solved the
problem?
import java.io.File; import java.util.Scanner; /** *
This program lists the files in a directory specified by * the
user. The user is asked to type in a directory name. * If the name
entered by the user is not a directory, a * message is printed and
the program ends. */ public class DirectoryList { public static...
using this array
I need to create a user created function in Matlab
that does the following
I have this so far but I'm so lost
could you please make this with comments on what the
codes do
Lure dueren suuj (COM 94 97 95 19 91 88 95 87 90 72 78 60 98 87 81 79 76 69 192 80 77 73 78 70 80 89 81 186 94 901 b. Find the lowest grade in Math subject...
I need help writing this code in C++ and I’m using xcode for
mac
the
objective is in the first picture and the rest is a sample output
of the code thaf needs to be similar
bjectives: . Perform C++ string object manipulation Understand how to manipulate data using arrays of structs Handle input errors and invalid values Design and create a wel-structure program using C++ basic programming constru Description: Write a menu-driven program that provides the following options 1....
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
I'm need help in the Pacific Trails section of
the assignment. I posted my chapter 2 assignment on the bottom of
the picture. I'm using Notepad++.
This was the previous assignment: CHAPTER 2
ASSIGMENT
paste the first content to index.html file and second to
yurts.html.
First: (index.html contents are below)
<!DOCTYPE html>
<head>
<title>Pacific Trails Resorts</title>
</head>
<style>
a{
padding-right:14px; /* padding anchor tage to right
15px for nav menu */
}
</style>
<body>
<header>
<h1>Pacific Trails Resort</h1>
...
The ACME Manufacturing Company has hired you to help automate
their production assembly line. Cameras have been placed above a
conveyer belt to enables parts on the belt to be photographed and
analyzed. You are to augment the system that has been put in place
by writing C code to detect the number of parts on the belt, and
the positions of each object. The process by which you will do this
is called Connected Component Labeling (CCL). These positions...
i need help with a mips program to to covert roman numerals to
real numbers
Lab 4: Roman Numeral Conversion Part A: Due Sunday, 19 May 2019, 11:59 PM Due Friday, 24 May 2019, 11:59 PM Part B: Minimum Submission Requirements Ensure that your Lab4 folder contains the following files (note the capitalization convention): o Diagram.pdf o Lab4. asm O README.txt Commit and push your repository Lab Objective In this lab, you will develop a more detailed understanding of how...
Design an original, professional web site following the specifications listed below. This web site will be for a business you plan to set up for yourself or for someone else. The following is a detailed list of the requirements for your web site. READ them carefully. Instructions - Web Site Requirements for the web site: General: You will thoroughly test all your pages in more than one browser. All links MUST work. All graphics must show on the page. All...