{"id":42,"date":"2009-06-20T15:09:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=42"},"modified":"2009-06-20T15:09:00","modified_gmt":"1970-01-01T00:00:00","slug":"asp-net-ile-resimleri-nasil-boyutlandiririz","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/06\/20\/asp-net-ile-resimleri-nasil-boyutlandiririz\/","title":{"rendered":"ASP.NET ile Resimleri Nasil  Boyutlandiririz"},"content":{"rendered":"<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">Merhabalar. Bu makalemizde asp.net c# ile resim boyutlandirmadan bahsedecegiz. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">Genel olarak resim boyutlandirma web de &ccedil;ok kullanilan bir yapidir. Mesela &uuml;ye islemlerinde profil resmi kaydedilirken, y&uuml;klenen resmin boyutunu ayarlamamiz gerekir yoksa &ccedil;ok b&uuml;y&uuml;k resimler i&ccedil;in sayfada &ccedil;ok fazla veri g&ouml;ndermek gerekecek, bu da sayfa y&uuml;klenme s&uuml;resini uzatacaktir.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">Simdi genel olarak bir resim y&uuml;kleme &ouml;rnegi yapalim. Bu &ouml;rnekte y&uuml;klenecek resmi, resim boyutlarini, resmin kaydedilecegi path ve ismi disaridan aliyoruz. Bunun i&ccedil;in asagidaki formu tasarlayalim.<\/span><\/p>\n<p align=\"center\" style=\"margin: 0cm 0cm 10pt; text-align: center;\" class=\"MsoNormal\"><span style=\"border: 1pt solid windowtext; padding: 0cm;\"><img decoding=\"async\" loading=\"lazy\" height=\"162\" width=\"251\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Seher\/resimboyutlandirma\/resim1.jpg\" \/><\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"614\" style=\"border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 460.6pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"><<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">table<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span> <span style=\"color: red;\">colspan<\/span><span style=\"color: blue;\">=&quot;2&quot;<\/span> <span style=\"color: red;\">style<\/span><span style=\"color: blue;\">=&quot;<\/span><span style=\"color: red;\">width<\/span>: <span style=\"color: blue;\">250px&quot;><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">input<\/span> <span style=\"color: red;\">id<\/span><span style=\"color: blue;\">=&quot;Resim_Gozat&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">style<\/span><span style=\"color: blue;\">=&quot;<\/span><span style=\"color: red;\">width<\/span>: <span style=\"color: blue;\">219px<\/span>; <span style=\"color: red;\">height<\/span>: <span style=\"color: blue;\">23px<\/span>;<span style=\"color: blue;\">&quot;<\/span> <span style=\"color: red;\">type<\/span><span style=\"color: blue;\">=&quot;file&quot;<\/span> <span style=\"color: blue;\">\/><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nnbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;Label1&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&quot;Y&uuml;kseklik&quot;><\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">TextBox<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;YukseklikTxt&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;><\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">TextBox<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;Label2&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&quot;Genislik&quot;><\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">TextBox<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;GenislikTxt&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;><\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">TextBox<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;Label3&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&quot;Resim Adi&quot;><\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">TextBox<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;ResimAdTxt&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;><\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">TextBox<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span> <span style=\"color: red;\">colspan<\/span><span style=\"color: blue;\">=&quot;2&quot;><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Button<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;Yuklebtn&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&quot;Y&uuml;kle&quot;<\/span> <span style=\"color: red;\">OnClick<\/span><span style=\"color: blue;\">=&quot;Yuklebtn_Click&quot;<\/span> <span style=\"color: blue;\">\/><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span> <span style=\"color: red;\">colspan<\/span><span style=\"color: blue;\">=&quot;2&quot;><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Image<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;kucukResim&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: blue;\">\/><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\"><\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">><\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Courier New&quot;;\"><\/<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); line-height: 115%; font-family: &quot;Courier New&quot;;\">table<\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Courier New&quot;;\">><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">G&ouml;z at butonu, yani FileUpload kullanimi ile ilgili detayli bilgiyi <span style=\"color: blue;\"><a href=\"..\/MakaleOku.aspx?Makale=Asp.Net+ile+Dosya+Upload+islemi&#038;MakaleKey=3586fbd5-da3e-4593-b33f-57dbfe408531\"><span style=\"text-decoration: none;\">buradan<\/span><\/a><\/span> inceleyebilirsiniz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">Yapimiz aslinda gayet basit. G&ouml;z at toolu ile se&ccedil;ilen resmi, istenen ebatlarda boyutlandirip istenen klas&ouml;re kaydediyoruz.<span style=\"\">&nbsp; <\/span>Bu islemi yapmak i&ccedil;in &ouml;ncelikle se&ccedil;ilen resmi ge&ccedil;ici olarak herhangi bir klas&ouml;re kaydediyoruz. Sonra Bitmap sinifini kullanarak istedigimiz boyutta kaydediyoruz. En son olarak ge&ccedil;ici resmimizi siliyoruz. Islemler sirasinda bize lazim olacak olan : <\/span><span style=\"font-size: small; font-family: Calibri;\">System<\/span><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;\">.Drawing.Imaging System.IO ve System.Drawing <\/span><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">k&uuml;t&uuml;phanelerini<span style=\"\">&nbsp; <\/span>kodumuza eklemeyi unutmayalim. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Segoe UI&quot;;\">Gerekli kodumuz:<\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"614\" style=\"border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 460.6pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/\/ gerekli degerleri alalim<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">int<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> genislik = 300;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">int<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> yukseklik = 400;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">string<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> resimAdi = <span style=\"color: rgb(163, 21, 21);\">&quot;yeniresim.jpg&quot;<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">string<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> resimyolu = Server.MapPath(<span style=\"color: rgb(163, 21, 21);\">&quot;&quot;<\/span>);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">try<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">{<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>genislik = <span style=\"color: rgb(43, 145, 175);\">Convert<\/span>.ToInt32(GenislikTxt.Text);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>yukseklik = <span style=\"color: rgb(43, 145, 175);\">Convert<\/span>.ToInt32(YukseklikTxt.Text);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">}<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">catch<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> (<span style=\"color: rgb(43, 145, 175);\">Exception<\/span>)<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">{<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">}<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">if<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> (ResimAdTxt.Text != <span style=\"color: rgb(163, 21, 21);\">&quot;&quot;<\/span>)<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">{<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>resimAdi = ResimAdTxt.Text + <span style=\"color: rgb(163, 21, 21);\">&quot;.jpg&quot;<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">}<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/\/resim boyutlandirma<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/\/ &ouml;nce file upload ile se&ccedil;ilen resmi ge&ccedil;ici olarak kaydelim<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">Resim_Gozat.PostedFile.SaveAs(<span style=\"color: rgb(163, 21, 21);\">&quot;\\\\&quot;<\/span> + Resim_Gozat.PostedFile.FileName);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/\/yeni boyutlarda bir resim olusturup<span style=\"\">&nbsp; <\/span>kaydedelim <\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">using<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> (<span style=\"color: rgb(43, 145, 175);\">Bitmap<\/span> gercekresim = <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">Bitmap<\/span>(<span style=\"color: rgb(163, 21, 21);\">&quot;\\\\&quot;<\/span> + Resim_Gozat.PostedFile.FileName))<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">{<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green;\">\/\/ boyutlari belirleyelim<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: rgb(43, 145, 175);\">Size<\/span> newSize = <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">Size<\/span>(yukseklik, genislik);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: rgb(43, 145, 175);\">Bitmap<\/span> yeniResim = <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">Bitmap<\/span>(gercekresim, newSize);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green;\">\/\/ resmi istenen klas&ouml;re kaydedelim <\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">string<\/span> path = resimyolu + <span style=\"color: rgb(163, 21, 21);\">&quot;\\\\&quot;<\/span> + resimAdi;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>yeniResim.Save(path,<span style=\"color: rgb(43, 145, 175);\">ImageFormat<\/span>.Jpeg);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>gercekresim.Dispose();<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>kucukResim.ImageUrl = resimAdi;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">}<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/\/ge&ccedil;ici olarak kaydettigimiz resmi silelim<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: rgb(43, 145, 175); font-family: &quot;Courier New&quot;;\">FileInfo<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> fi = <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">FileInfo<\/span>(<span style=\"color: rgb(163, 21, 21);\">&quot;\\\\&quot;<\/span> + Resim_Gozat.PostedFile.FileName);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;\">fi.Delete();<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><a href=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Seher\/resimboyutlandirma\/ResimBoyutlandir.rar\">&Ouml;rnek Projeyi buradan indirebilirsiniz<\/a><\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Genel olarak resim boyutlandirma web de &#231;ok kullanilan bir yapidir. Mesela &#252;ye islemlerinde profil resmi kaydedilirken, y&#252;klenen resmin boyutunu ayarlamamiz gerekir yoksa &#231;ok b&#252;y&#252;k resimler i&#231;in sayfada &#231;ok fazla veri g&#246;ndermek gerekecek, bu da sayfa y&#252;klenme s&#252;resini uzatacaktir.<\/p>\n","protected":false},"author":525,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[407],"tags":[5264,5609,4998,4254,5803,6005,4522],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/525"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}