Jump to content

Resim Boyutlandırma


sevcankonak
 Share

Recommended Posts

[img]http://i.imgur.com/S78uj.png[/img]

[codebox]sKlasor = Input.GetText("Input1") -- klasor yolunu al
sIsim = Input.GetText("Input2") -- yeni ismi al

if sKlasor ~= "" and sIsim ~= "" then -- eğer klasor ve isim boş değilse
tAra = File.Find(sKlasor, "*.*", false, false, nil, nil) -- klasordeki tum dosyaları buş
if tAra then -- eğer dosya varsa
for i,v in pairs(tAra) do -- döngüyü başlat
tSplit = String.SplitPath(v) -- sıradaki dosya yollaırnı ayır (sürücü, klasor, dosya ismi ve uzantı olarak)
File.Rename(v, tSplit.Drive .. tSplit.Folder .. sIsim .. "(" .. i .. ")" .. tSplit.Extension) -- yeni dosya ismine (#sayi) ekle ve değiştir
end
Dialog.Message("OK", "İşlem Tamamlandı")
else -- eğer dosya bulunamazsa
Dialog.Message("Hata", "Klasorde hiç dosya bulunamadı")
end
end[/codebox]

:download1:
[code]http://www.mediafire.com/?87853w4fr3d8db5[/code]

Link to comment
Share on other sites

[quote name='KintaRo' date='26 August 2011 - 19:55 ' timestamp='1314388523' post='1070393']
[img]http://i.imgur.com/S78uj.png[/img]

[codebox]sKlasor = Input.GetText("Input1") -- klasor yolunu al
sIsim = Input.GetText("Input2") -- yeni ismi al

if sKlasor ~= "" and sIsim ~= "" then -- eğer klasor ve isim boş değilse
tAra = File.Find(sKlasor, "*.*", false, false, nil, nil) -- klasordeki tum dosyaları buş
if tAra then -- eğer dosya varsa
for i,v in pairs(tAra) do -- döngüyü başlat
tSplit = String.SplitPath(v) -- sıradaki dosya yollaırnı ayır (sürücü, klasor, dosya ismi ve uzantı olarak)
File.Rename(v, tSplit.Drive .. tSplit.Folder .. sIsim .. "(" .. i .. ")" .. tSplit.Extension) -- yeni dosya ismine (#sayi) ekle ve değiştir
end
Dialog.Message("OK", "İşlem Tamamlandı")
else -- eğer dosya bulunamazsa
Dialog.Message("Hata", "Klasorde hiç dosya bulunamadı")
end
end[/codebox]

:download1:
[code]http://www.mediafire.com/?87853w4fr3d8db5[/code]
[/quote]

kintaro ams bilginden dolayı inan sana gıbta ediyorum. inşallah birgün bende senin gibi yardım almadan kod yazarım çok teşekkürler rahatsızlık vermesem birşey daha soracam acaba aynı işlemi resim boyuttlandırma içinde yapabilirmiyiz

Edited by sevcankonak
Link to comment
Share on other sites

Sanırım şu konu size yardımcı olur :) http://www.tnctr.com/topic/166102-resim-boyutlandyrma-ve-gizleme/
aşağıdaki kodlra değişken atayarak ilgili yerlerde çağırabilirsiniz.
[quote]Resim.Height = yukseklik; -- yüksekliği ini dosyasından al
Resim.Width = genislik; -- genişliği ini dosyasından al[/quote]
edit: bir kod hazırladım sonradan aklıma geldi bundan yola çıkarsn belki;

[quote]local width = Input.GetText("width");
local height = Input.GetText("height");
Image.SetSize("myimage", width, height);[/quote]

Edited by pilgetir
Link to comment
Share on other sites

sevcankonak sorunuzun cevabını verdim ya efendim;

2 ınput koyarsınız bı buton butonun on klik evreisne ; kendinize göre düzenleyin tabiki.
[quote]
local width = Input.GetText("width");
local height = Input.GetText("height");
Image.SetSize("myimage", width, height);[/quote]

Link to comment
Share on other sites

[quote name='pilgetir' date='28 August 2011 - 11:49 ' timestamp='1314532168' post='1071123']
sevcankonak sorunuzun cevabını verdim ya efendim;

2 ınput koyarsınız bı buton butonun on klik evreisne ; kendinize göre düzenleyin tabiki.
[/quote]

pilgetir yapamadım acaba küçük bir örnek paylaşamazmısın resim boyutu

width="500" height="650"

Link to comment
Share on other sites

[quote name='pilgetir' date='31 August 2011 - 07:58 ' timestamp='1314777497' post='1072190']
http://www.mediafire.com/?qh31xahxnojwkgk
[/quote]

pilgetir çok teşekkür ederim ama benim istedigim yukarıda kintaro nun yaptıgı program tarzıyla olması toplu haldeboyutlandırma

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...